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: ewww, a little JFrame problem.

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default ewww, a little JFrame problem.

    so yeah im experimenting with this way of making a JFrame, but i cant add the Jlabels annd textfields to the Jframe :/

    they labels and textfields dont show in the frame

    this is the code:
    	{
    		JFrame frame = new JFrame();
    	    label6 = new JLabel("tessst");
    	    label7 = new JLabel("test");
    	    txt3 = new JTextField(10);
    	    txt4 = new JTextField(10);
    	    frame.add(label6);
    	    frame.add(label7);
    	    frame.add(txt3);
    	    frame.add(txt4);
    	    frame.setTitle("Log in ");
            frame.setSize(180, 500);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    		}


  2. #2
    Member
    Join Date
    May 2013
    Posts
    33
    Thanks
    0
    Thanked 9 Times in 9 Posts

    Default Re: ewww, a little JFrame problem.

    ...spoonfeeding removed
    Last edited by copeg; May 19th, 2013 at 03:50 PM. Reason: Spoonfeeding removed

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,337
    Thanks
    182
    Thanked 830 Times in 773 Posts
    Blog Entries
    5

    Default Re: ewww, a little JFrame problem.

    @theoriginalanomaly, please don't spoonfeed and please read The Problem with Spoon-feeding and http://www.javaprogrammingforums.com...uncements.html

    This thread has been cross posted here:

    http://www.java-forums.org/new-java/73926-little-jframe-problem-im-doing-something-wrong.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


Similar Threads

  1. JFrame Exit Problem.
    By Tyluur in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 25th, 2013, 06:20 AM
  2. problem with my JFrame; JFrame not closing and stay in background
    By golominator in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 6th, 2012, 07:20 AM
  3. problem with jframe
    By mostafa_mohamed in forum AWT / Java Swing
    Replies: 1
    Last Post: September 7th, 2012, 06:16 PM
  4. Problem with a JFrame method
    By Lakmini Kuruppu in forum AWT / Java Swing
    Replies: 1
    Last Post: May 20th, 2010, 08:40 AM
  5. Change JFrame components problem
    By bruno88 in forum AWT / Java Swing
    Replies: 0
    Last Post: June 30th, 2009, 01:25 PM