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