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

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -