Package charvax.swing

Examples of charvax.swing.JList


                if (vehicles[ i].length() > columns)
                        columns = vehicles[ i].length();
            }
            model.addListDataListener(this);

            _vehicleList = new JList(model);
            _vehicleList.setVisibleRowCount(5);
            _vehicleList.setColumns(columns);
            _vehicleList.addListSelectionListener(this);
            JScrollPane scrollpane = new JScrollPane(_vehicleList);
            scrollpane.setViewportBorder(new TitledBorder("Vehicles"));
View Full Code Here


        gbc.gridheight = 6;
        gbc.insets = new Insets(1, 1, 1, 1);
        String[] countries = { "Portugal", "Spain", "France", "Italy",
                "Germany", "Poland", "Austria", "Belgium", "Denmark", "Norway",
                "Sweden"};
        _countryList = new JList(countries);
        _countryList.setVisibleRowCount(6);
        _countryList.setColumns(12);
        _countryList.addListSelectionListener(this);
        JScrollPane scrollpane = new JScrollPane(_countryList);
        TitledBorder viewportBorder = new TitledBorder("Countries");
View Full Code Here

            JPanel centerpan = new JPanel();
            String[] devices = { "Computer", "CD-ROM", "Disk drives",
                    "Display adapters", "Floppy disk controllers",
                    "Imaging devices", "Keyboard", "Modem", "Monitors", "Mouse"};
            JList deviceList = new JList(devices);
            deviceList.setBorder(new TitledBorder("Devices"));
            centerpan.add(deviceList);

            JPanel southpan = new JPanel();
            southpan.add(new JButton("Properties"));
            southpan.add(new JButton("Refresh"));
View Full Code Here

        super();
        this.rows = rows;
        this.cols = cols;
        this.setSize(new Dimension(cols, rows));

        jlist = new JList();
        jlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        jlist.setModel(new DefaultListModel());
        jlist.setVisibleRowCount(rows - 2);

        jlist.addListSelectionListener(new ListSelectionListener() {
View Full Code Here

TOP

Related Classes of charvax.swing.JList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.