Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen the frame become too small, the buttons in a panel are hidden
    text
    copied!<p>I use a class that <code>extends Frame</code> and in the constructor after defining all the propriety of the new Frame i append with the <code>BorderLayout.SOUTH</code> a new <code>Panel</code> that contains some buttons.</p> <p>When I reduce the size of the Frame, if the space for the buttons isn't enough some of these disappear from the Frame.</p> <p>How can I fix this problem?</p> <pre><code>public AdventureUI(Tappa tappa){ setTitle("Adventure Game"); //DIMENSIONE STANDARD DELLA FINESTRA setSize(700,500); setMinimumSize(new Dimension(400,300)); pannelloPrincipale = new Panel(new BorderLayout()); pannelloBottoni = new Panel(); testoTappa = new TextArea(tappa.toString(),25,50,TextArea.SCROLLBARS_NONE); testoTappa.setEditable(false); testoTappa.setBackground(new Color(211,211,211)); areaUtente = new TextArea("",25,30,TextArea.SCROLLBARS_VERTICAL_ONLY); //ADD BUTTONS TO PANEL setBottoni(pannelloBottoni,tappa.getTappeCollegate()); //AGGIUNGIAMO ELEMENTI AL PANNELLO PRINCIPALE pannelloPrincipale.add(testoTappa,BorderLayout.CENTER); pannelloPrincipale.add(areaUtente,BorderLayout.EAST); //AGGIUNGIAMO PANNELLI AL FRAME add(pannelloPrincipale,BorderLayout.CENTER); add(pannelloBottoni,BorderLayout.SOUTH); // ASCOLTATORE FINESTRA addWindowListener(new AdventureUIListener()); setVisible(true); } </code></pre> <p>Images of the problem: <img src="https://i.stack.imgur.com/wxciz.png" alt="Normal size"></p> <p><img src="https://i.stack.imgur.com/yaRic.png" alt="smaller size"></p> <p>As you can see the button with 26 is hidden.</p>
 

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