Tuesday 15 June 2010

java - When i resize my GUI panel with Dynamic elements in it.. those elements are scrambled -


Change the size of your GUI panel with

java: when I am in it dynamic element .. those elements are fried. P>

I have this japel open. When I change the size of this window .. some dynamic elements are scramled in a JPanel 2. Why is it?

This is a very long text of code and I do not know that I have to post. But I can tell you this:

  • 1: My have the GUI named JPanel jpBarDetails
  • 2: a public void that creates dynamic components within the JPanel
  • 3: I paid .. when this method is selected , Select the method of panel panelPayDetails is loaded with 2 dropdown menus

    so .. when I resize windows ... Dynamic panel are under all items in panelPayDetails when I was only 5 pixels or so

      public void initAfrekenenDisplay () resize the window by {jpBarDetails.removeAll (); rekeningContant.addActionListener (new ActionListener () {public void actionPerformed (ActionEvent e) {panelPayDetails.setBounds (245, 10, 360, 275); panelPayDetails.setSize (360, 275); panelPayDetails.setBackground (payDetailColor); panelPayDetails.setBorder ( JBBRAADEdit (panelpad details); JLABLLLLADNumerResult = New JLab ("Lidnommer:"); LBL.D. Numer Result. Setbond (10, 175, 200, 20); LBLIDNIMRRSult .set font (Agentry.phone_12_ BOLD); Panel packs description JtfLidNummerResult enable (false); jtfLidNummerResult.setBackground (verLightGray); panel PayDetails.add (jtfLidNummerResult); JLabel lblLidNaamResult) (Jeelafelaidianamar Result); JTFLidNummerResult.setBounds (180, 175, 130, 20); = new Jeelab ( "name"); Elbieladnet results. Setbond (10, 1 9 7, 200, 20); Elbielaidianamarsltksestfont (Ajhetia. Fon_l2_ BOLD); Panlpad details. Ed (Elbielelaidianamarslt); final Jetekstfild Jetifelaidianamarnslt = new Jetekstfild (); Jetifelaidianamar Esult.setBounds (180, 1 9 7, 130, 20); JtfLidNaamResult.enable (wrong); JtfLidNaamResult.setBackground (verLightGray); PanelPayDetails.add (jtfLidNaamResult); JLab LBEL Gebortedetam Result = New JLABEL ("Gagortatum:"); LLLEG weightoutment result .Setbond (10, 220, 200, 20); LblLidGeboortedatumResult.setFont (Applicatie.FONT_12_BOLD); PanelPayDetails.add (lblLidGeboortedatumResult); }}); }    

    You have to keep an eye on Java's layout management.

    You can either deploy components either, or keep layouts within the layout which compensates for window resizing.

    In addition, you should consider that your GUI will also affect the operating settings of the system (eg class versus vs. 7 windows), and the actual OS + Window Manager.

    You should not believe that what looks fine on your system will be visible in any other OS.

    Some useful links:



No comments:

Post a Comment