java - Resizing components of jframe automatically -
I am writing code on swing and using zero layout so that I can set j components anywhere , As far as I am using set bounds, when I maximize Jammu Frame then my components will be fixed.
How can I create components to reduce myself? Please help me with this important help
And I have to use zero layouts, I can not use any other layout because I have to give such a number of components a specific place.
The public class enhances the screen resize JFrame {Personal Stable PocketB; Screen Resize () {JFrame.setDefaultLookAndFeelDecorated (true); setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); Int framewidth = 200; Int framedheit = 100; Dimensions Screenshare = Toolkit.GetDefaultToolKit () GetScreenSize (); Setband (int) screenSize.getWidth () - framewidth, 0, framewidth, framedhite); SetVisible (true); B = new pocket (); B.setBounds (50,50,40,20); (B) add; } Public static zero main (string [] args) {new screen resize (); }} thanks
You will not be able to do this You do not want to reprogram that essentially what other layouts would be like border layouts, grid layouts, and so on. Therefore its solution is to not use a null layout and use a combination of other layouts simultaneously.
Here's a link to get started.
Comments
Post a Comment