Sunday, February 18, 2007

January Figurine, Blue

Exit application in java applet ImageIcon and Image in

to upload an image ImageIcon or a java applet using the following statement:

ImageIcon:

ImageIcon picture = new ImageIcon (getImage (getCodeBase (), "photo.jpg"));
ImageIcon image [] = new ImageIcon [10]; for (int i = 0; i image [i] = new ImageIcon (getImage (getCodeBase (), Integer.toString (i) + ". JPG"));}



 Miage To load an applet is used following code: Image 
imgJava = getImage (j.getCodeBase (), "java.png");
<10;i++){
can also perform the above trick to upload groups of pictures.

Icon image [] = new Icon [10];
for (int i = 0; i
image [i] = new getImage (j.getCodeBase (), "img" + Integer.toString (i) + " . png ");}



 
url

Friday, February 16, 2007

Failure Touchscreen Ipod

Read Open url in java text file

Example in java. This code opens a url of a web page and read
the entire contents of the address. The constants are the IP and PORT <10;i++){
own proxy if available, but proxy you remove or comment this part
code.
try {/ / In case of proxy
System.setProperty ("http.proxyHost", IP);
System.setProperty ("http.proxyPort", PORT);

URL address = new URL ("http://programasjava.blogspot.com");
 InputStreamReader isr = new InputStreamReader (direccion.openStream ()); 
BufferedReader input = new BufferedReader (isr);
String line = null;
while ((line = entrada.readLine ())!= null) {text + = line
+ "\\ N";}

entrada.close ();

} catch (MalformedURLException mre) {System.out.println
(mre);

} catch (IOException ioe) {System.out.println
( ioe);}





Thursday, February 15, 2007

Tourcher Movies Japanase



This example explains how to open a text file in java, showing it in through a JTextArea
name "Text" and choosing the file with a JFileChooser
.

String Text = ""; fc.showOpenDialog (this);
fc.getSelectedFile File Open = (); / Returns the File we will leerName
if (Abrir! = null) {FileReader
 Texto.setText (""); File = new FileReader (Open); 
BufferedReader read = new BufferedReader (file);
while ((Text = read. readLine ())!= null) {
Texto.append (Text + "\\ n") / / append concatenates the line read}

leer.close ();}


} catch (IOException ioe) {
System . out.println (ioe);}