Java Code Examples for javax.swing.JSeparator#setFocusable()

The following examples show how to use javax.swing.JSeparator#setFocusable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReservedCheckinWindow.java    From Hotel-Properties-Management-System with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Create the dialog.
 */
public ReservedCheckinWindow(Room roomNumber) {

	this.ownInjectedRoom = roomNumber;
	
	loggingEngine = LoggingEngine.getInstance();
	loggingEngine.setMessage("User is : " + sessionBean.getNickName());
	
	setMinimumSize(new Dimension(750, 495));
	setPreferredSize(new Dimension(750, 495));
	setLocationRelativeTo(null);

	this.setIconImage(Toolkit.getDefaultToolkit().
			getImage(getClass().getResource(LOGOPATH)));

	getContentPane().setForeground(new Color(255, 99, 71));
	getContentPane().setFocusCycleRoot(true);
	getContentPane().setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
	getContentPane().setFont(new Font("Verdana", Font.BOLD, 12));
	setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
	setDefaultCloseOperation(DISPOSE_ON_CLOSE);
	setModal(true);
	setResizable(false);

	this.setTitle("Coder HPMSA - [Checkin]");
	contentPanel.setAutoscrolls(true);
	contentPanel.setPreferredSize(new Dimension(10, 415));

	contentPanel.setBackground(Color.decode("#066d95"));
	contentPanel.setLayout(new BorderLayout(0, 0));
	getContentPane().add(contentPanel, BorderLayout.SOUTH);

	upperPanel = new JPanel();
	upperPanel.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
	upperPanel.setBackground(new Color(135, 206, 235));
	upperPanel.setPreferredSize(new Dimension(10, 35));
	contentPanel.add(upperPanel, BorderLayout.NORTH);

	JLabel lblChangeRoomPerson = new JLabel("Change person count : ");
	lblChangeRoomPerson.setFont(new Font("Arial", Font.PLAIN, 15));
	upperPanel.add(lblChangeRoomPerson);

	spinner = new JSpinner();
	spinner.setModel(new SpinnerNumberModel(1, 1, 3, 1));
	spinner.setPreferredSize(new Dimension(40, 20));
	spinner.setMinimumSize(new Dimension(35, 20));
	spinner.addChangeListener(customerCounterListener());
	upperPanel.add(spinner);

	JPanel buttonPanel = new JPanel();
	buttonPanel.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
	buttonPanel.setPreferredSize(new Dimension(10, 50));
	buttonPanel.setLayout(null);
	getContentPane().add(buttonPanel, BorderLayout.NORTH);

	JButton roomCheckinBtn = new JButton("Room checkin");
	roomCheckinBtn.addActionListener(this);
	roomCheckinBtn.setIcon(new ImageIcon(ReservedCheckinWindow.class
					.getResource("/com/coder/hms/icons/extra_checkin.png")));
	roomCheckinBtn.setBounds(7, 4, 130, 42);
	buttonPanel.add(roomCheckinBtn);

	final JSeparator separator = new JSeparator();
	separator.setBackground(Color.DARK_GRAY);
	separator.setBounds(149, 6, 10, 36);
	separator.setOrientation(SwingConstants.VERTICAL);
	separator.setFocusable(true);
	separator.setForeground(Color.DARK_GRAY);
	separator.setAutoscrolls(true);
	separator.setPreferredSize(new Dimension(10, 20));
	buttonPanel.add(separator);

	JLabel lblRoom = new JLabel("ROOM : ");
	lblRoom.setFont(new Font("Verdana", Font.BOLD, 15));
	lblRoom.setBounds(330, 8, 68, 33);
	buttonPanel.add(lblRoom);

	JLabel roomNumberLbl = new JLabel(ownInjectedRoom.getNumber());
	roomNumberLbl.setForeground(new Color(220, 20, 60));
	roomNumberLbl.setFont(new Font("Verdana", Font.BOLD, 17));
	roomNumberLbl.setBounds(406, 8, 103, 33);
	buttonPanel.add(roomNumberLbl);
	
	contentPanel.add(customerFormOne.setCustomerDetailPanel(), BorderLayout.WEST);
	prepareCustomerForms(ownInjectedRoom.getNumber());

}