Convertion of Decimal to Binary, Octal, and Hexadecimal in Applet

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

public class SampleGui extends JApplet{

JLabel lblDec, lblBin, lblOct, lblHex;

JTextField txtDec, txtBin, txtOct, txtHex;

JButton btnConvert, btnContinue, btnExit;

Container con;

JFrame f;

public void init()

{

int i;

String Number;

Number=JOptionPane.showInputDialog(null,"Enter the decimal value!: ");

i=Integer.parseInt(Number);

con = getContentPane();

con.setLayout(new GridLayout(5,2));

con.setSize(20,20);

lblBin = new JLabel( "Binary:");

con.add( lblBin );

txtBin = new JTextField( Integer.toBinaryString(i) );

txtBin.setEditable( true );

con.add( txtBin );

lblOct = new JLabel( "Octal:" );

con.add( lblOct );

txtOct = new JTextField( Integer.toOctalString(i) );

txtOct.setEditable( true );

con.add( txtOct );

lblHex = new JLabel( "Hexadecimal:" );

con.add( lblHex );

txtHex = new JTextField( Integer.toHexString(i).toUpperCase() );

txtHex.setEditable( true );

con.add( txtHex );

btnConvert = new JButton("Convert");

btnConvert.setSize(5,5);

con.add(btnConvert);

btnExit = new JButton("Exit");

con.add(btnExit);

}

}

[1367 byte] By [apoli87a] at [2007-10-3 6:28:50]
# 1
excellent! Looks just like code, except for the missing code tags and the lack of a single comment anywhere in the entire thing.Must be the work of a seasoned professional. Better publish that right away.
marlin314a at 2007-7-15 1:15:34 > top of Java-index,Other Topics,Algorithms...
# 2
excellent! Looks just like code, except for the missing code tags and the lack of a single comment anywhere in the entire thing.Must be the work of a seasoned professional. Better publish that right away.
marlin314a at 2007-7-15 1:15:34 > top of Java-index,Other Topics,Algorithms...
# 3
Thank you!!!!
apoli87a at 2007-7-15 1:15:34 > top of Java-index,Other Topics,Algorithms...
# 4
> Thank you!!!![url= http://www.google.com/search?q=define:irony]* click *[/url]
prometheuzza at 2007-7-15 1:15:34 > top of Java-index,Other Topics,Algorithms...