Reputation: 481
Is there any possibilities to scale the contents of the J Frame For Example : if im giving the initial setSize(800,1000) in which i placed the textfields,labels,buttons etc..as per the size 800,1000 the application looks good,suppose im maximizing the window of the Frame, automatically the textfields,labels,buttons are kept in the static way...how to scale it when the maximize is pressed the entire contents are cleanly arranged in good manner..kindly give me solution to solve this issue
Upvotes: 1
Views: 157
Reputation: 109823
if im giving the initial setSize(800,1000) in which i placed the textfields,labels,buttons etc..as per the size 800,1000 the application looks good,suppose im maximizing the window of the Frame, automatically the textfields,labels,buttons are kept in the static way...
AbsoluteLayout
to have to place the JComponent
by using the Insets
that came from first container
Is there any possibilities to scale the contents of the J Frame
have to use ComponentListener
(notice delayed by Swing Timer
, because this Listener
firing a new event for every pixels on all directions) for scalling JComponents
together with container
this is job only for LayoutManager
, don't to supply that by using AbsoluteLayout
& Insets
& ComponentListener
, be sure this code could be longer an more complicated than by using GroupLayout
Upvotes: 1