+ 3
How to position JComboBox properly?
I am creating a Jframe that has a JComboBox but the combo box is covering all the frame even after setting bounds correctly. Is there any way to solve it?
4 ответов
+ 2
Im sure you forgot to add frame.setLayout(null);
+ 1
Yes, you can use BorderLayout to your JFrame, then create 2 JPanels, add panel1 to BorderLayout.NORTH :
frame.add(panel1, BorderLayout.NORTH);
and panel2 to BorderLayout.CENTER:
frame.add(panel2, BorderLayout.CENTER);
then you can just add your buttons to panel1
(JPanel is using FlowLayout as default)
Try it out yourself, if you still got some problems just tell me
0
JavaBobbo Yes that was the problem. Thank you.
0
How to create a offline gaming apps please sent me the post