Few questions to organize my game(How to create RTS?)

contenu2.add(DoodeVert);

most mistakes in your samples are layout settings.

  1. Adding a component when using other layouts than FlowLayout is done with a constraint : BorderLayout -> South, north… ; GridBagLayout * -> gridbagconstraints instance; etc.
  2. And at least one of the component must set a preferredSize if no “fixed” component like JLabel or JprogressBar are present.
  3. each modification sequence after setVisible(true) must be explicitely validated
  4. when handling multiple threads, ensure you’re in the EventDispatcherThread to make such layout modifications : SwingUtilities are therefore recommended tools.
    :wink:
  • : GridBagLayout may generally render a better look and feel, but is tricky.