Java Code For Jfrane
Java Code For Jfrane
* Created by: Joey * July 18, 2008 */ public class Main extends JFrame implements ActionListener{ /** * */ private static final long serialVersionUID = 1L; public Main(){ /* * JFrame. */ setSize(600,600);//Size of JFrame setDefaultCloseOperation(EXIT_ON_CLOSE); setVisible(true);//Sets if its visible. /* * JButton. */ JButton startButton = new JButton("Start");//The JButton name. add(startButton);//Add the button to the JFrame. startButton.addActionListener(this);//Reads the action. } /* *The main method. */ public static void main(String[] args){ new Main();//Reads method main() } /* *What the button does. */ public void actionPerformed(ActionEvent e) { System.out.println("The Button Works!");//what the button says when clicked. } }
#2
tazboy
CC Lurker
Posted 04 November 2012 - 04:25 AM Thanks. I needed a basic one to see the minimal requirements. 0 Back to Java Tutorials Next Unread Topic
Similar Topics
javascript basic array concept Started by mariajoshef, 29 Aug 2013 In: General Forums General Programming web application management
2 replies 2 30 views
Need to create a website with Visual Basic Started by sreepriya, 22 Aug 2013 In: Language Forums Visual Basic creating a website using vb o 1 o 2
o o o
H ot 12 replies 53 5 views
o
1 reply 2 93 views
0 replies 2 44 views
o
Started by welton122, 04 Aug 2013 In: General Forums Mobile Development facebook, api, ios, basic and 5 more...
3 replies 4 36 views
o
Started by RodneyMathew, 14 Jul 2013 In: Language Forums Visual Basic vb6, visual basic, visual basic 6 and 2 more...
Black Rabbit
21 Jul 2013
java,
Language Forums Java Keep GUI (JFrame) active or clickable while calling a method Started by Leind, 06 Mar 2013 jframe, method Language Forums Java GUI Development: JFrame and JPanels
java, gui,
jpanel,
java,
advertise here 1. Codecall 2. Tutorial Forums 3. Java Tutorials 4. Privacy Policy 5. Guidelines