I need two combo boxes in a singel frame
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: I need two combo boxes in a singel frame

  1. #1
    Join Date
    May 2012

    I need two combo boxes in a singel frame

    Hi guys am trying to add two comboboxes in a frame. but am getting the problem in that. Kindly help me. i have tried many things but couldn't rectify the problem.

    public class IndexPerformanceView extends JFrame implements ActionListener {
        private static final long serialVersionUID = 1L;
        private IndexPerformanceControl model;
        private Box filter;
        private JComboBox xchg;
        private JComboBox chgtype;
        private JFrame jframe;
        private Object ContentPane;
        public static int selectedindex;
    public IndexPerformanceView() {
            model = new IndexPerformanceControl();
            this.getContentPane().add(model, BorderLayout.SOUTH);
            xchg = new JComboBox(new String[] { "NSE" });
            this.getContentPane().add(xchg, BorderLayout.CENTER);
            chgtype = new JComboBox(new String[] { "Change%", "Change" });
            this.getContentPane().add(chgtype, BorderLayout.EAST);
            this.setTitle("IDX Performance");
            this.setBounds(100, 100, 600, 480);
    I am trying to add two comboboxes xchg and chgtype at the top of the frame. but when i do it am getting the problem. I will send you the screenshot..
    Attached Images Attached Images  

  2. #2
    Join Date
    May 2006

    Re: I need two combo boxes in a singel frame

    Why are you adding chgtype to both labelpanel and to the root pane and what is labelpanel, it isn't declared anywhere.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)