Monday, December 15, 2008

Thanking Guests Messages



CHRISTMAS TREE

import java.awt .*;
import javax.swing .*;
import java.awt.event .*;
import java.util .*;
AlberoNatale public class JFrame {private
tree ;
private PannelloAlbero a;
private JButton on;
private JButton off;
public AlberoNatale () {
tree = new JFrame ("Tree of Christmas 2008");
albero.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
tree. setSize (500.500);
PannelloAlbero a = new ();
lights = new JButton ("Light bulbs");
off = new JButton ("turn off the lights");
albero.add (a, BorderLayout.CENTER);
albero.add (lights, BorderLayout.SOUTH)
albero.setVisible (true);}


public PannelloAlbero class extends JPanel {public void
paintComponent (Graphics g) {Graphics
G2D = (Graphics2D) g;
Image alberoImmagine = new ImageIcon ("albNat.jpg). getImage ();
g.drawImage (alberoImmagine, 0, 0, albero.getWidth (), albero.getHeight (), null);}


} public static void main (String [] args) {tree = new
AlberoNatale AlberoNatale ();}

}
_____________________________________________________________________________________
Free Image Hosting at www.ImageShack.us

QuickPost QuickPost this image to Myspace, Digg, Facebook, and others!

Monday, December 8, 2008

Why Do Cats Play Apttycake?



CALCULATOR

import java.awt .*;
import javax.swing .*;
import java.awt.event .*;
Finestra2 implements ActionListener {public class
JLabel l1 = new JLabel ("First number ");
JLabel l2 = new JLabel (" second issue ");
JTextField t1 = new JTextField ();
JTextField t2 = new JTextField ();
JButton b1 = new JButton JTextField result ("+");
= new JTextField ();
creaForm1 public void () {JFrame
Window1 = new JFrame ("window IVL");
finestra1.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
finestra1.setSize (300.300);
finestra1.setLayout (new GridLayout (3,2));
finestra1.add (l1);
finestra1.add (t1);
Window1 . add (l2);
finestra1.add (t2);
finestra1.add (b1);
finestra1.add (result);
b1.addActionListener (this);
finestra1.setVisible (true);}

public void actionPerformed (ActionEvent event) {String text1 =
t1.getText ();
t2.getText String testo2 = ();
int a = Integer.parseInt (text1);
int b = Integer.parseInt (text2);
int sum = a + b;
String r = Integer.toString (sum);
risultato.setText (r);}

}

the operation of the sum is done by clicking on the "+" using the applet!

Thursday, December 4, 2008

Cars Generator 24 Volt



Sum
import javax.swing.JOptionPane public class Sum {public static void main (String [] args) {String primoNumero JOptionPane.showInputDialog = ("enter first number"); secondoNumero String = JOptionPane.showInputDialog ("enter second number") int a = Integer.parseInt (primoNumero); int b = Integer.parseInt (secondoNumero); int c = a + b; JOptionPane.showMessageDialog (null, "sum =" + c, "the sum of two integers, JOptionPane.PLAIN_MESSAGE);}}
_____________________________________________________________________
Free Image Hosting at <a href= www.ImageShack.us " />

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!


___________________________________________________________________________________

Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

_____________________________________________________________________________________

Free Image Hosting at www.ImageShack.us

QuickPost Quickpost this image to Myspace, Digg, Facebook, and others!

Monday, December 1, 2008

Can Whey Protein Cause Nose Bleed



How to build a window

import javax.swing .*; public class Window1 {public void creaForm1 () {Window1 = new JFrame JFrame ("window IVL"); finestra1.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); Window1. setSize (300.300); finestra1.setVisible (true);}}


___________________________________________________________________________________


TestaFinestra1 public class {public static void main (String [] args) {Window1 f = new Window1 (); f.creaForm1 ();}}