// Dritarja e nje aplikacioni me JOption
// duke perdorur paketat swing dhe awt
import [Link].*;
import [Link].*;
public class gui {
public static void main(String args[]) {
// Krijimi i Frame-s
JFrame frame = new JFrame("Aplikacioni 01");
[Link](JFrame.EXIT_ON_CLOSE);
[Link](500, 400);
// Krijimi i shiritit me menute e ndryshme
JMenuBar mb = new JMenuBar();
JMenu m1 = new JMenu("File");
JMenu m2 = new JMenu("Edit");
JMenu m3 = new JMenu("Format");
JMenu m4 = new JMenu("Help");
[Link](m1);
[Link](m2);
[Link](m3);
[Link](m4);
JMenuItem m111 = new JMenuItem("Krijo");
JMenuItem m222 = new JMenuItem("Hap");
JMenuItem m333 = new JMenuItem("Ruaj");
JMenuItem m444 = new JMenuItem("Printo");
JMenuItem m555 = new JMenuItem("Mbyll");
[Link](m111);
[Link](m222);
[Link](m333);
[Link](m444);
[Link](m555);
// Krijimi i panelit ne fund te dritares me komponentet e saj
JPanel panel = new JPanel(); // the panel is not visible in output
JLabel label = new JLabel("Futni tekst");
JTextField tf = new JTextField(15); // accepts upto 10 characters
JButton send = new JButton("Dergo");
JButton reset = new JButton("Zero");
[Link](label); // Components Added using Flow Layout
[Link](label); // Components Added using Flow Layout
[Link](tf);
[Link](send);
[Link](reset);
// Text Area at the Center
JTextArea ta = new JTextArea();
//Adding Components to the frame.
[Link]().add([Link], panel);
[Link]().add([Link], mb);
[Link]().add([Link], ta);
[Link](true);
}
}