Wrox Programmer Forums
|
BOOK: Java Programming 24-Hour Trainer by Yakov Fain
This is the forum to discuss the Wrox book Java Programming 24-Hour Trainer by Yakov Fain; ISBN: 978-0-470-88964-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Java Programming 24-Hour Trainer by Yakov Fain section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2011, 06:39 PM
Registered User
 
Join Date: Apr 2011
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Lesson 8

Error in here , can't find it by myself .
If someone will find it ,please let me know.

package flow.layout;

import java.awt.*;

import javax.swing.*;

public class Flow {


JPanel windowContent;
JLabel label1;
JLabel label2;
JLabel label3;

Flow () {


windowContent = new JPanel();

FlowLayout fl = new FlowLayout();
windowContent.setLayout(fl);

label1 = new JLabel(" test 1");
label2 = new JLabel (" test 2");
label3 = new JLabel (" test 3 ");
windowContent.add(label1);
windowContent.add(label2);
windowContent.add(label3);

JFrame frame = new JFrame("My test" );

frame.setContentPane(windowContent);
frame.pack();



frame.setVisible(true);
}
public static void main(String[] args){
new Flow() ;
}

}
 
Old June 29th, 2011, 09:49 AM
Registered User
 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default This code is work

package com.practicaljava.lesson30;
import java.awt.*;
import javax.swing.*;

public class Flow {

JPanel windowContent;
JLabel label1;
JLabel label2;
JLabel label3;

Flow () {
windowContent = new JPanel();
FlowLayout fl = new FlowLayout();
windowContent.setLayout(fl);
label1 = new JLabel(" test 1");
label2 = new JLabel (" test 2");
label3 = new JLabel (" test 3 ");
windowContent.add(label1);
windowContent.add(label2);
windowContent.add(label3);

JFrame frame = new JFrame("My test" );

frame.setContentPane(windowContent);
frame.pack();
frame.setVisible(true);
}
public static void main(String[] args){
new Flow() ;
}
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Lesson 5 exercises. thelemur BOOK: Java Programming 24-Hour Trainer by Yakov Fain 9 March 29th, 2013 11:56 PM
Lesson 2 - can not create Class BubNorth BOOK: Java Programming 24-Hour Trainer by Yakov Fain 1 March 4th, 2012 09:44 PM
Lesson 3 Method Overriding. Ontonomo BOOK: Java Programming 24-Hour Trainer by Yakov Fain 1 June 16th, 2011 05:11 PM
Lesson 6 Try It zavodney BOOK: Stephens' Visual Basic Programming 24-Hour Trainer 2 June 6th, 2011 10:07 PM
Lesson 3 question soneal777 BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 1 August 30th, 2010 06:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.