- import javax.swing.*;
- public class Simple {
- JFrame f;
- Simple(){
- f=new JFrame();//creating instance of JFrame
- JButton b=new JButton("click");//creating instance of JButton
- b.setBounds(130,100,100, 40);
- f.add(b);//adding button in JFrame
- f.setSize(400,500);//400 width and 500 height
- f.setLayout(null);//using no layout managers
- f.setVisible(true);//making the frame visible
- }
- public static void main(String[] args) {
- new Simple();
- }
- }
Friday, 23 March 2018
Swing initialization
Subscribe to:
Post Comments (Atom)
Swing Menu
Hi All, Use this code. ------------------------------------------------------- package placement; import java.awt.*; import java.io.*...
-
Hi All, See the JTable code import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.Sw...
-
import java.awt.*; import java.awt.event.*; class AEvent extends Frame implements ActionListener{ TextField tf; AEvent(...
-
Hi All, As the title given, Java is so simple, because tons of materials are available in this domain. In the coming sessions we will go...
No comments:
Post a Comment