hey , i have wrote the following example code :
what i need are 2 things:import org.jdesktop.swingx.*; import javax.swing.*; import java.awt.*; public class TaskPaneExample{ public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new TaskPaneExample(); }}); } public TaskPaneExample() { JFrame frame = new JFrame("TaskPane Example 1"); frame.add(doInit(), BorderLayout.CENTER); frame.setLocationRelativeTo(null); frame.pack(); frame.setVisible(true); } private Component doInit() { JXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer(); taskpanecontainer.setLayout(new VerticalLayout(2)); final JXTaskPane taskpane1 = new JXTaskPane(){ public void setCollapsed(boolean w){ super.setCollapsed(w); }}; taskpane1.setTitle("First TaskPane"); JPanel panel1 = new JPanel(); panel1.setBackground(Color.red); panel1.setSize(100,100); taskpane1.add(panel1); taskpanecontainer.add(taskpane1); JXTaskPane taskpane2 = new JXTaskPane(){ public void setCollapsed(boolean w){ super.setCollapsed(w); }}; taskpane2.setTitle("My Tasks"); JPanel panel2 = new JPanel(); panel2.setBackground(Color.blue); panel2.setSize(100,100); taskpane2.add(panel2); taskpanecontainer.add(taskpane2); taskpanecontainer.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); return taskpanecontainer; } }
1. how do i change the bgcolor of the title, i think it is done with the taskpane2.setUI(..) option but i had no luck working with it.
2. how to set the border between the JXTaskPane and the Jpanel to zero.
thanks for any help