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

Recommended Answers

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.