JAVA MAIN FILE
--------------------------
package apples;
import javax.swing.JFrame;
public class Main
{
public static void main(String[] args)
{
tuna obj = new tuna();
obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
obj.setSize(275, 180);
obj.setVisible(true);
}
}
JAVA FILE
----------------
package apples;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class tuna extends JFrame
{
private JLabel item1;
public tuna()
{
super("The Title Bar");
setLayout(new FlowLayout());
item1 = new JLabel("This is a sentnce");
item1.setToolTipText("You have hovred over it");
add(item1);
}
}
--------------------------
package apples;
import javax.swing.JFrame;
public class Main
{
public static void main(String[] args)
{
tuna obj = new tuna();
obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
obj.setSize(275, 180);
obj.setVisible(true);
}
}
JAVA FILE
----------------
package apples;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class tuna extends JFrame
{
private JLabel item1;
public tuna()
{
super("The Title Bar");
setLayout(new FlowLayout());
item1 = new JLabel("This is a sentnce");
item1.setToolTipText("You have hovred over it");
add(item1);
}
}
No comments:
Post a Comment