import java.applet.*;
import java.awt.*;
public class Ingredients2 extends Applet {
private TextField t;
private double price = 7.00;
public void init( ) {
this.setLayout(new GridLayout(11,1));
this.add(new Label(“What do you want on your pizza?”, Label.CENTER));
this.add(new Checkbox(“Pepperoni”));
this.add(new Checkbox(“Olives”));
this.add(new Checkbox(“Onions”));
this.add(new Checkbox(“Sausage”));
this.add(new Checkbox(“Peppers”));
this.add(new Checkbox(“Extra Cheese”));
this.add(new Checkbox(“Ham”));
this.add(new Checkbox(“Pineapple”));
this.add(new Checkbox(“Anchovies”));
this.t = new TextField(“$” + String.valueOf(price));
// so people can’t change the price of the pizza
this.t.setEditable(false);
this.add(this.t);
}
/* I’ve removed the code to handle events
since it isn’t relevant to this example */
Home      |      About Us      |     Portfolio      |      Services      |      Courses      |     Career      |      Cost      |      Contact Us
Services
  SEO   
  Link Building
  Data Entry
  Web Design and development
  Web Application development
 

Graphic and multimedia

  E-Commerce Solutions
  Software development
  Web Marketing & Promoting
  Internet Marketing
  IT Outsourcing
  Multimedia/CD Presentation
  Synopsis Ideas
  Project Ideas
  Placement Papers
  Live Project Training
  Programming & Projects
  Faq
  Training @balujalabs
 
 
Method
 

Add checkbox, Textbox object in grid layout view.

 

 

 

 

 

 

 

 

 

                                                                                                                                          

1
2 To demonstrate border layout view.
3 Add checkbox, Textbox object in grid layout view.
4 To demonstrate Grid Bag Layout View
5 To produce a calculator applet using only a grid layout and nested panels.
6 To demonstrate manual layout.
7 To put up a window, that can be moved and resized. The window has a single text area component.
8 To display a simple non model dialog with an ok button and title box.
9 Centering a frame on the screen.
10 The applet to put the text of each member item selected to put the text field.