Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*;
- import javax.swing.event.*;;
- class Gui_ListChoice1 {
- public static class Window extends JFrame
- {
- Window()
- {
- addWindowListener(new WindowAdapter()
- {
- public void windowClosing(WindowEvent e)
- {
- dispose();
- }
- });
- setLayout(null);
- setSize(400,300);
- setVisible(true);
- List list1 = new List(4,false);
- list1.add("1");
- list1.add("2");
- list1.add("3");
- list1.add("4");
- add(list1);
- list1.setBounds(150,10,80,60);
- List list2 = new List(3,true);
- list2.add("1");
- list2.add("2");
- list2.add("3");
- add(list2);
- list2.setBounds(150,150,80,60);
- }
- }
- public static void main(String[] args)
- {
- new Window();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement