English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

It's supposed to ask for a name and password. If the name is Fred and the password is Derf, it should print good to the screen.


import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;

public class MainFrame{

private Patient currentUser;

public MainFrame(){

JFrame theFrame = new JFrame("Log In");
theFrame.setSize(400, 400);
theFrame.setLocation(500, 250);
Container contentPane = theFrame.getContentPane();
contentPane.setLayout(new GridLayout(2, 2));

JLabel nameStuff = new JLabel("Enter Name");
JLabel passwordStuff = new JLabel("Enter Password");

final JTextField nameField = new JTextField();
final JPasswordField passwordField = new JPasswordField();

contentPane.add(nameStuff);
contentPane.add(nameField);
contentPane.add(passwordStuff);
contentPane.add(passwordField);

ActionListener pass = new ActionListener(){

2006-12-05 15:19:41 · 2 answers · asked by ashcatash 5 in Computers & Internet Programming & Design

2 answers

this code is incomplete plz mail me the whole thing and i will let you know

2006-12-05 15:27:24 · answer #1 · answered by sulav.aryal 3 · 1 0

I really don't know what all of the language means that you wrote. All you have to do is download "SunJava", from the link I have given you below. Works automatic in your system, plus updates automatic.

Here is the free link for download and updates

http://www.java.com/en/download/index.js...

Minddoctor, France

2006-12-05 15:32:08 · answer #2 · answered by MINDDOCTOR 7 · 1 0

fedest.com, questions and answers