|
-
can anyone tell me what is wrong with this code!!
the compiler does not find any errors but the window doesnt appears when i execute the code.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class BankTEST extends JFrame {
public BankTEST() {
super("a");
Container logincontainer=getContentPane();
logincontainer.setLayout( new FlowLayout() );
JLabel Username=new JLabel("username");
JLabel Password=new JLabel("password");
JTextField UsernameText=new JTextField(10);
JTextField PasswordText=new JPasswordField(10);
JButton Login=new JButton("LOGIN");
logincontainer.add(Username);
logincontainer.add(Password);
logincontainer.add(UsernameText);
logincontainer.add(PasswordText);
logincontainer.setSize( 500, 170 );
logincontainer.setVisible(true);
}
public static void main(String args[]){
BankTEST b=new BankTEST();
b.setDefaultCloseOperation(
JFrame.EXIT_ON_CLOSE );
}
}
Similar Threads
-
By Sunil Menon in forum .NET
Replies: 2
Last Post: 03-27-2002, 02:15 PM
-
Replies: 150
Last Post: 03-04-2002, 05:40 PM
-
By Rob Teixeira in forum .NET
Replies: 5
Last Post: 11-27-2001, 06:12 PM
-
Replies: 1
Last Post: 11-01-2000, 03:11 AM
-
Replies: 0
Last Post: 10-31-2000, 10:20 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks