4 * Created on 16 October 2001, 18:03
\r
9 package org.tjworld.components;
\r
11 import java.awt.Color;
\r
16 public class ColourQube extends javax.swing.JPanel implements java.io.Serializable {
\r
18 private java.awt.Color colour = java.awt.Color.white;
\r
20 /** Creates new form ColourQube */
\r
21 public ColourQube() {
\r
25 /** This method is called from within the constructor to
\r
26 * initialize the form.
\r
27 * WARNING: Do NOT modify this code. The content of this method is
\r
28 * always regenerated by the Form Editor.
\r
30 private void initComponents() {//GEN-BEGIN:initComponents
\r
32 setLayout(new java.awt.BorderLayout());
\r
34 }//GEN-END:initComponents
\r
36 public void setColour(java.awt.Color col) {
\r
37 if(col != null) colour = col;
\r
40 public java.awt.Color getColour() {
\r
44 public void paint(java.awt.Graphics g) {
\r
45 java.awt.Graphics2D g2 = (java.awt.Graphics2D)g; // treat as a 2D graphics context
\r
49 // Variables declaration - do not modify//GEN-BEGIN:variables
\r
50 // End of variables declaration//GEN-END:variables
\r