Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen i resize my GUI panel with Dynamic elements in it.. those elements are scrambled
    text
    copied!<p>Java: When i resize my GUI panel with Dynamic elements in it.. those elements are scrambled</p> <p>I have this Jpanel opened. When i resize this window.. Some dynamic elements are scramled in a 2nd jpanel.. why is this?</p> <p>It is a very long text of code and i dont know what i have to post.. but i can tell you this:</p> <ul> <li>1: i have this GUI jPAnel named jpBarDetails </li> <li>2: a public void that is generating dynamic components for within this jPAnel </li> <li>3: I start with 2 dropdown menu's for selecting method of payment.. when this method is selected, the panel panelPayDetails is loaded.</li> </ul> <p>So.. when i resize the window.. all items within the dynamic panel panelPayDetails are scrambled when i resize the window by only 5 pixels or so</p> <pre><code>public void initAfrekenenDisplay() { 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(BorderFactory.createEtchedBorder()); jpBarDetails.add(panelPayDetails); JLabel lblLidNummerResult = new JLabel("Lidnummer:"); lblLidNummerResult.setBounds(10, 175, 200, 20); lblLidNummerResult.setFont(Applicatie.FONT_12_BOLD); panelPayDetails.add(lblLidNummerResult); final JTextField jtfLidNummerResult = new JTextField(); jtfLidNummerResult.setBounds(180, 175, 130, 20); jtfLidNummerResult.enable(false); jtfLidNummerResult.setBackground(verLightGray); panelPayDetails.add(jtfLidNummerResult); JLabel lblLidNaamResult = new JLabel("Naam:"); lblLidNaamResult.setBounds(10, 197, 200, 20); lblLidNaamResult.setFont(Applicatie.FONT_12_BOLD); panelPayDetails.add(lblLidNaamResult); final JTextField jtfLidNaamResult = new JTextField(); jtfLidNaamResult.setBounds(180, 197, 130, 20); jtfLidNaamResult.enable(false); jtfLidNaamResult.setBackground(verLightGray); panelPayDetails.add(jtfLidNaamResult); JLabel lblLidGeboortedatumResult = new JLabel("Geboortedatum:"); lblLidGeboortedatumResult.setBounds(10, 220, 200, 20); lblLidGeboortedatumResult.setFont(Applicatie.FONT_12_BOLD); panelPayDetails.add(lblLidGeboortedatumResult); } }); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload