The younger brother found a section code in the Internet.
Although I don't understand, I really want to understand it.
I wrote it myself.
How can you compose it?
I hope that you can give your youep only!
Greatful!
Import javax.swing. *;
Import java.awt. *;
Public class myframe extends jframe
{
JButton Button;
Jlabel label;
Jtextfield text;
JPANel P;
Font F;
Public myframe ()
{
Super ("My Window");
Button = New JButton ("Button");
Button.Settext ("Button");
Button.SetForeground (Color.Red);
f = New font ("Huawenbo", Font.Bold, 36);
Button.SetFont (f);
Label = New Jlabel ("label");
Label.SetTooltiptext ("this is a label");
Label.setfont (f);
Label.Settext ("label");
Text = New jtextfield (10);
Text.Settext ("1213");
Text.setfont (f);
P = new jpanel ();
getContentPane (). Add (p);
p.Add (Button);
P.Add (label);
p.Add (text);
SetDefaultCloseOperation (jframe.exit_on_close);
Setsize (300, 300);
SetVisible (TRUE);
}
Public static void main (string [] args)
{
NEW myframe ();
}
}