Posts

Showing posts with the label Eclipse

Creating a Windows application in Java using Eclipse

Image
Step 1: Create a new Java Application In Eclipse select File > New > Java Project: Step 2: Create a new Frame In Eclipse, right click the 'src' folder and select New > Other. In the wizard dialog that appears select WindowBuilder > Swing Designer > JFrame: Click Next. Give your JFrame a name: Click Finish. Note how the following code for gui.java gets generated: [code language="java"] import java.awt.BorderLayout; public class gui extends JFrame { private JPanel contentPane; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { gui frame = new gui(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public gui() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 300); contentPane = new JPanel(); conten...

Getting Started with Java in Eclipse

Image
1. Open Eclipse and create a new project Select File -> New -> Java Project. Give your project a name and change the default locxation of the folder location, if desired. Click the Finish button: