jt = new JTabbedPane(JTabbedPane.TOP);
    jt.setTabPlacement(JTabbedPane.TOP);


            //panel1
        jp.setPreferredSize(new Dimension (50,50));
        jp.setLayout(new BorderLayout());
        jp.setBackground(Color.BLACK);
        jp.setPreferredSize(new Dimension(60,50));  
        jp4 = new JPanel();
        j = new JButton("Draw The Graph");
        j.addActionListener(this);
        jp4.setBorder(BorderFactory.createRaisedBevelBorder());
        jp4.setPreferredSize(new Dimension(180,40));
        jp4.add(j);

        jp.add(jp4,BorderLayout.EAST);  
        String[] a = {"select  "};
        lab = new JLabel("x parameters");
        lab.setLocation(700,700);
        jp4.add(lab);
        jcb= new JComboBox(a);
        jp4.add(jcb);
        lab1 = new JLabel("Y parameters");
        jp4.add(lab1);
        jcb1= new JComboBox(a);
        jp4.add(jcb1);
        jt.addTab("graph1", jp);

public void actionPerformed(ActionEvent e)
    {   

      if((JButton)e.getSource() == j)
       {
        jc1 = new JColorChooser();
        [U]// JColorChooser.showDialog(jp,"Change", jc1);[/U]

        }
    }   

.

Z:\Program Files\Java\jdk1.6.0\bin>javac proj.java
proj.java:101: showDialog(java.awt.Component,java.lang.String,java.awt.Color) in
 javax.swing.JColorChooser cannot be applied to (javax.swing.JPanel,java.lang.St
ring,javax.swing.JColorChooser)
                        jc1 =  JColorChooser.showDialog(jp4,"Change", jc1);

Also dear frnds since am new to java...am also not able to postion jlabel combo in required position on the panel

You are calling the method wrong. The compiler tells you EXACTLY what is the problem. If you can't figure out such a simple message, what are you doing with GUIs and not learning the basics of java?

proj.java:101:
showDialog(java.awt.Component,java.lang.String,java.awt.Color)
in javax.swing.JColorChooser cannot be applied to
(javax.swing.JPanel,java.lang.String,javax.swing.JColorChooser)

As you can see you are not calling the method with the right arguments.

Check the API: JColorChooser

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.