protected Button cancelButton = new Button();\r
protected Scrollbar rScroller = new Scrollbar();\r
Label label1 = new Label();\r
- Panel panel2 = new Panel();\r
- BorderLayout borderLayout1 = new BorderLayout();\r
- protected TextField rText = new TextField();\r
- Panel panel3 = new Panel();\r
- Label label4 = new Label();\r
+ protected TextField rText = new TextField();\r
+ Label label4 = new Label();\r
protected Scrollbar gScroller = new Scrollbar();\r
protected TextField gText = new TextField();\r
- BorderLayout borderLayout2 = new BorderLayout();\r
- Panel panel4 = new Panel();\r
- Label label5 = new Label();\r
+ Label label5 = new Label();\r
protected Scrollbar bScroller = new Scrollbar();\r
protected TextField bText = new TextField();\r
- BorderLayout borderLayout3 = new BorderLayout();\r
- protected Panel target = new Panel();\r
+ protected Panel target = new Panel();\r
\r
public GUserDefinedColours() {\r
try {\r
this.setBackground(new Color(212, 208, 223));\r
jPanel2.setBounds(new Rectangle(0, 265, 400, 35));\r
buttonPanel.setBounds(new Rectangle(0, 123, 400, 142));\r
- rScroller.setMaximum(255);\r
+ rScroller.setMaximum(256);\r
rScroller.setMinimum(0);\r
rScroller.setOrientation(0);\r
rScroller.setUnitIncrement(1);\r
- rScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
+ rScroller.setVisibleAmount(1);\r
+ rScroller.setBounds(new Rectangle(36, 27, 119, 19));\r
+ rScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
public void adjustmentValueChanged(AdjustmentEvent e) {\r
rScroller_adjustmentValueChanged(e);\r
}\r
});\r
- label1.setText("R");\r
- panel2.setBounds(new Rectangle(20, 29, 180, 19));\r
- panel2.setLayout(borderLayout1);\r
- rText.setText(" 0");\r
- rText.addActionListener(new java.awt.event.ActionListener() {\r
+ label1.setAlignment(Label.RIGHT);\r
+ label1.setText("R");\r
+ label1.setBounds(new Rectangle(19, 30, 16, 15));\r
+ rText.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10));\r
+ rText.setText("0 ");\r
+ rText.setBounds(new Rectangle(156, 27, 53, 19));\r
+ rText.addActionListener(new java.awt.event.ActionListener() {\r
public void actionPerformed(ActionEvent e) {\r
rText_actionPerformed(e);\r
}\r
});\r
- panel3.setLayout(borderLayout2);\r
- label4.setText("G");\r
- gScroller.setMaximum(255);\r
+ label4.setAlignment(Label.RIGHT);\r
+ label4.setText("G");\r
+ label4.setBounds(new Rectangle(15, 56, 20, 15));\r
+ gScroller.setMaximum(256);\r
gScroller.setMinimum(0);\r
gScroller.setOrientation(0);\r
gScroller.setUnitIncrement(1);\r
- gScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
+ gScroller.setVisibleAmount(1);\r
+ gScroller.setBounds(new Rectangle(35, 52, 120, 20));\r
+ gScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
public void adjustmentValueChanged(AdjustmentEvent e) {\r
gScroller_adjustmentValueChanged(e);\r
}\r
});\r
- gText.setText(" 0");\r
- gText.addActionListener(new java.awt.event.ActionListener() {\r
+ gText.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10));\r
+ gText.setText("0 ");\r
+ gText.setBounds(new Rectangle(156, 52, 53, 20));\r
+ gText.addActionListener(new java.awt.event.ActionListener() {\r
public void actionPerformed(ActionEvent e) {\r
gText_actionPerformed(e);\r
}\r
});\r
- panel3.setBounds(new Rectangle(19, 54, 181, 20));\r
- panel4.setLayout(borderLayout3);\r
- label5.setText("B");\r
- bScroller.setMaximum(255);\r
+ label5.setAlignment(Label.RIGHT);\r
+ label5.setText("B");\r
+ label5.setBounds(new Rectangle(14, 82, 20, 15));\r
+ bScroller.setMaximum(256);\r
bScroller.setMinimum(0);\r
bScroller.setOrientation(0);\r
bScroller.setUnitIncrement(1);\r
- bScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
+ bScroller.setVisibleAmount(1);\r
+ bScroller.setBounds(new Rectangle(35, 78, 120, 20));\r
+ bScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() {\r
public void adjustmentValueChanged(AdjustmentEvent e) {\r
bScroller_adjustmentValueChanged(e);\r
}\r
});\r
- bText.setSelectionStart(6);\r
- bText.setText(" 0");\r
- bText.addActionListener(new java.awt.event.ActionListener() {\r
+ bText.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10));\r
+ bText.setText("0 ");\r
+ bText.setBounds(new Rectangle(157, 78, 52, 20));\r
+ bText.addActionListener(new java.awt.event.ActionListener() {\r
public void actionPerformed(ActionEvent e) {\r
bText_actionPerformed(e);\r
}\r
});\r
- panel4.setBounds(new Rectangle(19, 87, 180, 20));\r
- target.setBackground(Color.black);\r
+ target.setBackground(Color.black);\r
target.setBounds(new Rectangle(229, 26, 134, 79));\r
this.add(jPanel2, null);\r
jPanel2.add(okButton, null);\r
jPanel2.add(applyButton, null);\r
jPanel2.add(cancelButton, null);\r
this.add(buttonPanel, null);\r
- panel2.add(label1, BorderLayout.WEST);\r
- panel2.add(rScroller, BorderLayout.CENTER);\r
- panel2.add(rText, BorderLayout.EAST);\r
- this.add(target, null);\r
- this.add(panel4, null);\r
- panel3.add(label4, BorderLayout.WEST);\r
- panel3.add(gScroller, BorderLayout.CENTER);\r
- panel3.add(gText, BorderLayout.EAST);\r
- this.add(panel2, null);\r
- panel4.add(label5, BorderLayout.WEST);\r
- panel4.add(bScroller, BorderLayout.CENTER);\r
- panel4.add(bText, BorderLayout.EAST);\r
- this.add(panel3, null);\r
- }\r
+ this.add(target, null);\r
+ this.add(gScroller);\r
+ this.add(rScroller);\r
+ this.add(bScroller);\r
+ this.add(label5);\r
+ this.add(label4);\r
+ this.add(label1);\r
+ this.add(gText);\r
+ this.add(rText);\r
+ this.add(bText);\r
+ }\r
\r
protected void okButton_actionPerformed(ActionEvent e) {\r
}\r