hi i have combobox and list i want to put both of them in one border help me please

Recommended Answers

Put them on their own panel with an appropriate layout manager: http://download.oracle.com/javase/tutorial/uiswing/layout/index.html

Jump to Post
Add them in a panel
public mypanel extends JPanel
{
Set Layout...
add combobox
add list
setBorder
}

Simple and easy Algorithem.

Jump to Post

All 6 Replies

Add them in a panel
public mypanel extends JPanel
{
Set Layout...
add combobox
add list
setBorder
}

Simple and easy Algorithem.

hi
first thank you for your help
i write this code but i have an error

JPanel p=new JPanel();
private JButton b1 = new JButton();
  private JButton b2 = new JButton();
 TitledBorder tb=new TitledBorder("legend");
  p.add(b1);
      p.add(b2);
      p.setBorder(tb);

hi
i doesnot understand what you write can you please explain

i have an error

Please copy and paste the error message here.

thank you all for your help you help me to solve the problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.