6
我想將藍色背景顏色更改爲任務面板容器的白色。我已經使用了下面的行,但沒有任何影響這條線。如何更改JXTaskPaneContainer的bg顏色
UIManager.put("TaskPaneContainer.background", Color.LIGHT_GRAY);
請給我一些想法,改變BG顏色。
public class NewJFrame2 extends javax.swing.JFrame {
public NewJFrame2() {
initComponents();
setSize(462, 300);
add(doInit());
setBackground(Color.WHITE);
}
private Component doInit() {
JXTaskPaneContainer taskpanecontainer = new JXTaskPaneContainer();
//taskpanecontainer.setLayout(new VerticalLayout(2));
JXTaskPane taskpane1 = new JXTaskPane();
taskpane1.setTitle("First TaskPane");
JXTable table = new JXTable();
DefaultTableModel model = new DefaultTableModel();
model.addColumn("ParameterName");
model.addColumn("ParameterType");
model.addColumn("Operation");
model.addRow(new Object[]{"Request", "String", "Delete"});
model.addRow(new Object[]{"Request", "String", "Delete"});
table.setModel(model);
((JComponent) taskpane1.getContentPane()).setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
taskpane1.add(table);
taskpanecontainer.add(taskpane1);
taskpanecontainer.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));
return taskpanecontainer;
}
}
我分享的形象也讓我在你的心中已經清除..
感謝
這是安全的呢?爲什麼swingx沒有辦法編輯它? –