1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
package ThePEG;
import javax.swing.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
public class SwitchOption extends JLabel {
String name;
String comment;
long index;
public SwitchOption(long indx, String nm, String cm) {
index = indx;
name = nm;
comment = cm;
setText(Long.toString(index) + ": " + name);
setToolTipText(SetupThePEG.ttt + comment);
setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
}
public long getIndex() {
return index;
}
public String getName() {
return name;
}
public String getComment() {
return comment;
}
public String toString() {
return getText();
}
public static void classcheck() {}
}
|