Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: hey guys....

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Location
    kottayam, kerala, India
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default hey guys....

    hey mates, this is prince here. i'm a college student and i'm working on a java application project using java swing. As i'm really a newbie, i guess i have the coding right. I want to make a user-interface and i have no idea on how to proceed. if there's any1 who can help me, plz do contact me on princejoseph@aol.in,
    ur help is much appreciated...


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: hey guys....

    Hello prince,

    Welcome to the forums

    Take a look at the official Sun tutorials:

    Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials)

    Everything you need to know is there!!

    When you get stuck, feel free to post your problems in our Swing forum:

    AWT / Java Swing - Java Programming Forums

    Good luck with your project!!
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  3. The Following User Says Thank You to JavaPF For This Useful Post:

    prince joseph (March 27th, 2010)

  4. #3
    Junior Member
    Join Date
    Feb 2010
    Location
    Canada
    Posts
    25
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: hey guys....

    Here's a simple GUI Template I have from last year. Hope it helps!

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
     
     
    public class GUITemplate extends JFrame
    implements ActionListener {
     
    private JPanel panel1, panel2;	
    private JButton button1, button2;
     
    public GUITemplate() {
     
    setTitle("GUITemplate");
     
    panel1 = new JPanel();
    panel2 = new JPanel();
     
    //Button 1
    button1 = new JButton("Button 1");
    button1.addActionListener(this);
     
    //Button 2
    button2 = new JButton("Button 2");
    button2.addActionListener(this);
     
    setLayout(new GridLayout(2,1));
     
    //add buttons to panels
    panel1.add(button1);
    panel2.add(button2);
    add(panel1);
    add(panel2);
     
    }
     
    public static void main(String args[]) {
     
    GUITemplate gui = new GUITemplate();
    gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
    gui.setSize(200,200);
    gui.setLocation(200,200);
    gui.setVisible(true);	
     
    }
     
    public void actionPerformed(ActionEvent e) {
     
    if(e.getSource()==button1) {
    	button1.setEnabled(false);
    }
     
    if(e.getSource()==button2) {
    	button1.setEnabled(true);
    }
     
    }
    }

Similar Threads

  1. need help in my assignment guys :(
    By Mr.cool in forum Collections and Generics
    Replies: 7
    Last Post: December 28th, 2009, 08:30 AM
  2. Hi guys
    By fembiz in forum Member Introductions
    Replies: 3
    Last Post: December 11th, 2009, 03:36 AM
  3. need help guys
    By Imeri0n in forum Java Theory & Questions
    Replies: 9
    Last Post: December 3rd, 2009, 09:39 AM
  4. [SOLVED] Some important questions about java programming
    By chronoz13 in forum Java Theory & Questions
    Replies: 12
    Last Post: April 16th, 2009, 03:55 PM