| | |
JMenu ...Can't remember
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Heres an example of a couple different ones
Java Syntax (Toggle Plain Text)
/* * ChoiceTest * Demonstrates the Choice Component */ import java.awt.*; public class ChoiceTest { public ChoiceTest() { //Make the Choices Choice c1 = new Choice(); c1.add("Soup"); c1.add("Salad"); Choice c2 = new Choice(); c2.add("Java"); c2.add("C++"); c2.add("HTML"); c2.add("JavaScript"); c2.add("COBOL"); c2.add("FORTRAN"); Choice c3 = new Choice(); c3.add("One"); c3.add("Two"); c3.add("Three"); c3.setForeground(Color.red); c3.setBackground(Color.black); c3.setFont(new Font("Courier", Font.PLAIN, 16)); Choice c4 = new Choice(); c4.add("Not Enabled"); c4.add("Nope"); c4.setEnabled(false); //Make the Frame and add the Choices to it ComponentTestFrame frame = new ComponentTestFrame("Choice Test"); frame.add(c1); frame.add(c2); frame.add(c3); frame.add(c4); frame.setVisible(true); } public static void main(String args[]) { ChoiceTest ct = new ChoiceTest(); } }
PETA People for the Eating of Tasty Animals.
FireFox
Hijack This
Ad-Aware
Hijack this tutorial
Microsoft AntiSpyware
CompUchat
FireFox
Hijack This
Ad-Aware
Hijack this tutorial
Microsoft AntiSpyware
CompUchat
•
•
Join Date: Mar 2004
Posts: 10
Reputation:
Solved Threads: 0
Ho,
Well it depends you can create one of these and add them to your drop down menu object:
JRadioButtonMenuItem
JCheckBoxMenuItem
I'm sure there are others but these are the only two that i ever used. create these and add them to your MenuItem objects.
I don't know if that's what you wanted to hear, but that's all i got.:cry:
Mel
Well it depends you can create one of these and add them to your drop down menu object:
JRadioButtonMenuItem
JCheckBoxMenuItem
I'm sure there are others but these are the only two that i ever used. create these and add them to your MenuItem objects.
I don't know if that's what you wanted to hear, but that's all i got.:cry:
Mel
![]() |
Similar Threads
- How to remember password (Web Browsers)
Other Threads in the Java Forum
- Previous Thread: Question about indexing objects
- Next Thread: JLabel Web Link
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary bluetooth character chat class classes client code component consumer csv database desktop draw eclipse error event exception fractal ftp game givemetehcodez graphics gui html ide image input integer j2me japplet java javaarraylist javac javaee javaprojects jmf jni jpanel julia linked linux list loop map method methods mobile netbeans newbie objects online oracle oriented panel print printf problem program programming project projects properties recursion replaydirector reporting researchinmotion robot rotatetext rsa scanner screen se server set size sms sort sql string swing template test threads time tree ubuntu update windows






