Everything Kirillcool said PLUS
Please use the code tags!
[\code]your java code here [\/code]
Remove backslashes to make code. (just how does one escape bbcode in bbcode?)
e.g.
[code]
import javax.swing.*;
import javax.swing.border.*;
import javax.accessibility.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.image.BufferedImage;
/*
* RootLayeredPaneDemo.java requires images/dukeWaveRed.gif.
*/
public class RootLayeredPaneDemo extends JPanel
implements ActionListener, MouseMotionListener {
private int[] layers = {-3, 0, 3};
private String[] layerStrings = {"Yellow (-30000)",
"Magenta (0)",
"Cyan (301)"};
private Color[] layerColors = {Color.yellow,
Color.magenta,
Color.cyan};
private JLayeredPane layeredPane;
private JLabel dukeLabel;
private JCheckBox onTop;
private JComboBox layerList;
//Action commands
private static String ON_TOP_COMMAND = "ontop";
private static String LAYER_COMMAND = "layer";
//Adjustments to put Duke's toe at the cursor's tip.
private static final int XFUDGE = 40;
private static final int YFUDGE = 57;
//Initial layer of dukeLabel.
private static final int INITIAL_DUKE_LAYER_INDEX = 1;
public RootLayeredPaneDemo(JLayeredPane layeredPane) {
super(new GridLayout(1, 1));
//Create and load the duke icon.
final ImageIcon icon = createImageIcon("images/dukeWaveRed.gif");
//Create and set up the layered pane.
this.layeredPane = layeredPane;
layeredPane.addMouseMotionListener(this);
//This is the origin of the first label added.
Point origin = new Point(10, 100);
//This is the offset for computing the origin for the next label.
int offset = 35;
//Add several overlapping, colored labels to the layered pane
//using absolute positioning/sizing.
for (int i = 0; i < layerStrings.length; i++) {
JLabel label = createColoredLabel(layerStrings
]]]]]]]]]]]]]
[/code]
[Message sent by forum member 'phenderson' (phenderson)]
http://forums.java.net/jive/thread.jspa?messageID=325844
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".