private void createTableLabel() { tableLabel = new JLabel(MAIN_LABEL); tableLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); Font f = GuiUtil.makeVeryLargeFont(tableLabel.getFont()); f = GuiUtil.makeBoldFont(f); tableLabel.setFont(f); }
private void defineUpperPanel() { upperSubpanel = new JPanel(); upperSubpanel.setLayout(new BorderLayout()); upperSubpanel.setBackground(GuiUtil.FILLER_COLOR); // create and add label createTableLabel(); upperSubpanel.add(tableLabel, BorderLayout.NORTH); // create and add table createTableAndTablePane(); GuiUtil.createCustomColumns(table, TABLE_WIDTH, COL_WIDTH_PROPORTIONS, DEFAULT_COLUMN_HEADERS); JPanel tablePanePanel = GuiUtil.createStandardTablePanePanel(table, tablePane); upperSubpanel.add(tablePanePanel, BorderLayout.CENTER); }
private void defineLowerPanel() { // add button JButton addButton = new JButton(ADD); addButton.addActionListener(control.getAddCatalogListener(this)); // edit button JButton editButton = new JButton(EDIT); editButton.addActionListener(control.getEditCatalogListener(this)); // delete button JButton deleteButton = new JButton(DELETE); deleteButton.addActionListener(control.getDeleteCatalogListener(this)); // back button JButton backButton = new JButton(BACK); backButton.addActionListener(control.getBackToMainListener(this)); // create lower panel JButton[] buttons = {addButton, editButton, deleteButton, backButton}; lowerSubpanel = GuiUtil.createStandardButtonPanel(buttons); }
private void initializeWindow() { setSize(GuiUtil.SCREEN_WIDTH, GuiUtil.SCREEN_HEIGHT); GuiUtil.centerFrameOnDesktop(this); }