Hello everybody,
I am trying to build my first form and I am not able to find out how to
make the keytab work.
Find below my source code
Thank you
Alessandro
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.JTextField;
public class Prova_tabulazione extends Frame
{
private static int WIDTH = 350;
private static int HEIGHT = 200;
private static String TITLE = "Alessandro";
JTextField txtField1 = new JTextField();
JButton btnProva = new JButton("Prova");
JPanel Pannello1 = new JPanel();
public static void main(String[] args)
{
Prova_tabulazione app = new Prova_tabulazione();
};
public Prova_tabulazione()
{
super(TITLE);
setFocusTraversalKeysEnabled(true);
addWindowListener(new WindowHandler());
setSize(WIDTH, HEIGHT);
Pannello1.setBackground(Color.green);
txtField1.setBounds(10, 40, 100, 20);
btnProva.setBounds(10, 80, 100, 20);
add(txtField1);
add(btnProva);
add(Pannello1);
show();
};
public class WindowHandler extends WindowAdapter
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
}
}
Roland - 03 Aug 2005 20:06 GMT
> Hello everybody,
>
[quoted text clipped - 11 lines]
>
> public class Prova_tabulazione extends Frame
Extend from JFrame:
public class Prova_tabulazione extends JFrame
Mixing AWT and Swing components may lead to various problems.

Signature
Regards,
Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
alexjcasol - 04 Aug 2005 07:33 GMT