Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > Java
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 07-12-2006, 10:51 AM   #1 (permalink)
benzspida
Registered User
 
Join Date: Jun 2006
Posts: 10
benzspida is on a distinguished road
swing applet help

trying to create a swing applet that will display a form for creating an email directory, dont know if the code was writting correctly

Code:
import java.awt.*: public class JEmailForm extends java.applet.Applet { Label firstnameLabel= new Label ("First Name:"); TextFied textfield = new TextField (25); Label lastnameLable = new Lable("Last Name:"); TextField lastname = new TextField (25); Label emailLabel = new Lable("Email:"); TextField email = new TextField (25); Jbutton entVal = new Jbutton ("submit"); public void init() { add (firstnameLabel); add (firstname); add (lastnameLabel); add (lastname); add (emailLabel); email.setEchoCharacter ('*'); add (email); add (jbutton); } }
__________________

Last edited by redhead : 07-12-2006 at 12:12 PM.
benzspida is offline   Reply With Quote
Old 07-12-2006, 12:55 PM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
Belisarius is on a distinguished road
I'm not an expert on Applets, but I believe they are AWT based, not Swing, which is a different package. You imported the AWT package, but not the Swing package, so it's probably going to complain about the JButton (which, by the way, you misspelled - Java is case-sensitive), which is from Swing, not AWT.

You can usually tell what's part of Swing because it usually starts with a 'J', such as JLabel or JButton.
__________________
GitS
Belisarius is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculator applet davidmccabe Java 4 05-07-2006 02:10 PM
Help!! Help me in applet!! monalisa Java 4 10-23-2005 08:07 AM
drawing shapes in any diagonal direction in applet davidmccabe Java 3 03-17-2005 02:53 AM
Change line width in drawing applet/ allow text entry davidmccabe Java 0 03-16-2005 06:45 AM
Java Swing - Multiple Perspectives unwiseone Java 1 05-18-2004 03:08 PM


All times are GMT -8. The time now is 09:56 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle