public void actionPerformed(ActionEvent e) { for (int k = 0; k <= 4; k++) { // 先將全部顏色按鈕還原為浮凸狀 btnCr[k].setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); if (e.getSource() == btnCr[k]) { pane.setBackground(cr[k]); // 被點按的顏色按鈕呈凹陷狀 btnCr[k].setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); } } }
public void createDesiredBorder(JButton jbtn) { jbtn.setBorder( javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED), javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory.createMatteBorder( 2, 2, 2, 2, new java.awt.Color(0, 0, 0)), javax.swing.BorderFactory.createBevelBorder( javax.swing.border.BevelBorder.RAISED))), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED))); }
/* PRE: - */ private void initComponents( JLabel labelNombre, JTextField fieldNombre, JLabel labelTopologia, JComboBox cajaTopologia, JLabel labelAnchura, JTextField fieldAnchura, JLabel labelAltura, JTextField fieldAltura, JLabel labelPrefijadas, JTextField fieldPrefijadas) { this.labelNombre = labelNombre; this.fieldNombre = fieldNombre; this.labelTopologia = labelTopologia; this.cajaTopologia = cajaTopologia; this.labelAnchura = labelAnchura; this.fieldAnchura = fieldAnchura; this.labelAltura = labelAltura; this.fieldAltura = fieldAltura; this.labelPrefijadas = labelPrefijadas; this.fieldPrefijadas = fieldPrefijadas; setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); }
// <editor-fold defaultstate="collapsed" // desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { this.label = new javax.swing.JLabel(); this.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); this.setTitle("Initializing system logic"); this.setAlwaysOnTop(true); this.setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR)); this.setFocusable(false); this.setResizable(false); this.setUndecorated(true); this.label.setFont(new java.awt.Font("Arial", 0, 14)); this.label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); this.label.setText("Starting application, please wait ..."); this.label.setBorder( javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this.getContentPane()); this.getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(this.label, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 431, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(this.label, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)); this.pack(); } // </editor-fold> //GEN-END:initComponents
private void initialize() { setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); fileLabel = new JLabel(I18n.text("(no log loaded)")); fileLabel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); fileLabel.setBackground(Color.white); fileLabel.setOpaque(true); filePanel.add(fileLabel, BorderLayout.CENTER); fileSelection = new JButton("..."); fileSelection.setMargin(new Insets(1, 1, 1, 1)); fileSelection.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { selectFile(); } }); filePanel.add(fileSelection, BorderLayout.EAST); filePanel.setMaximumSize(new Dimension(200, 25)); add(filePanel); overlaysPanel = new JPanel(); overlaysPanel.setLayout(new BoxLayout(overlaysPanel, BoxLayout.PAGE_AXIS)); add(new JScrollPane(overlaysPanel)); }
public HToggleButton(BufferedImage icon) { this.icon = icon; setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); listOfToggleButtons.add(new WeakReference(this)); setPreferredSize(new Dimension(icon.getWidth() + 4, icon.getHeight() + 4)); initListeners(); }
private void paintNewPosition() { for (int j = 0; j < 4; j++) { cells[f.arrY[j] + f.offsetY][f.arrX[j] + f.offsetX].setBackground(f.getGolor()); cells[f.arrY[j] + f.offsetY][f.arrX[j] + f.offsetX].setBorder( BorderFactory.createBevelBorder(BevelBorder.RAISED)); } }
@Override public JComponent createBannerPanel() { BannerPanel headerPanel1 = new BannerPanel("<b>This is a BannerPanel</b>"); headerPanel1.setFont(new Font("Tahoma", Font.PLAIN, 11)); headerPanel1.setBackground(Color.WHITE); headerPanel1.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); return headerPanel1; }
/** * adds a tab to the tabview, and gives the content a lowered bevelborder to show that it is in * the tab. * * @param tabName the name to stand on the tab * @param content the content that should be shown under the tab * @param width the width of the screen to calculate tab size and make them clickable with touch */ public void addNewTab(String tabName, JPanel content) { // create new tab, names it and gives it size and colors. content.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); Tab t = new Tab(tabName, content); tabs.add(t); addTab(tabName, content); setBackgroundAt(tabs.size() - 1, Color.WHITE); }
private JLabel getJLabelRespuesta() { if (jLabelRespuesta == null) { jLabelRespuesta = new JLabel(); jLabelRespuesta.setText("..."); jLabelRespuesta.setHorizontalAlignment(SwingConstants.CENTER); jLabelRespuesta.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); } return jLabelRespuesta; }
public void selectWithoutAction() { deselectAllInToggleGroup(); execListeners = false; lastBackColor = getBackground(); setBackground(Color.YELLOW); selected = true; execListeners = true; setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); }
/** * This method initializes statusLabel * * @return JLabel */ private JLabel getStatusLabel() { if (statusLabel == null) { statusLabel = new JLabel(); statusLabel.setText("Number of moves: 0"); statusLabel.setBorder( javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); } return statusLabel; }
/** Creates and sets the window and its content's borders. */ void makeBorders(int increment) { JRootPane rootPane = window.getRootPane(); rootPane.setBorder(BorderFactory.createLineBorder(BORDER_COLOR, BORDER_THICKNESS + increment)); if (canvas != null) { canvas.setBorder( BorderFactory.createBevelBorder( BevelBorder.LOWERED, INNER_BORDER_HIGHLIGHT, INNER_BORDER_SHADOW)); } }
public StatusPanel(JLabel label) { super(); this.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); this.setLayout(new FlowLayout(FlowLayout.LEFT)); this.setBackground(bgColor); this.add(new JLabel("Status: ")); this.add(label); label.setFont(new Font("Monospaced", Font.BOLD, 14)); }
/** * @param listener - GUI * @param size - Dimension */ public KodeKsToolBar(GUI listener, Dimension size) { setPreferredSize(size); setOpaque(true); setBorder(BorderFactory.createBevelBorder(VERTICAL)); JButton ToolBarItem_NGame = new JButton(" New Game "); ToolBarItem_NGame.setPreferredSize(new Dimension(128, size.height)); ToolBarItem_NGame.setBorder(BorderFactory.createRaisedBevelBorder()); ToolBarItem_NGame.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { new NewGameDialog(); } }); add(ToolBarItem_NGame); JButton ToolBarItem_Load = new JButton(" Load "); ToolBarItem_Load.setPreferredSize(new Dimension(128, size.height)); ToolBarItem_Load.setBorder(BorderFactory.createRaisedBevelBorder()); ToolBarItem_Load.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { new LoadGame(); } }); JButton ToolBarItem_Save = new JButton(" Save "); ToolBarItem_Save.setPreferredSize(new Dimension(128, size.height)); ToolBarItem_Save.setBorder(BorderFactory.createRaisedBevelBorder()); ToolBarItem_Save.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { new SaveGame(); } }); JButton ToolBarItem_Resign = new JButton(" Resign "); ToolBarItem_Resign.setPreferredSize(new Dimension(128, size.height)); ToolBarItem_Resign.setBorder(BorderFactory.createRaisedBevelBorder()); ToolBarItem_Resign.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { new ResignDialog(); } }); setFloatable(false); add(ToolBarItem_NGame); add(ToolBarItem_Load); add(ToolBarItem_Save); add(ToolBarItem_Resign); add(Box.createHorizontalGlue()); }
public void deselect() { if (isSelected()) { selected = false; setBackground(lastBackColor); setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); if (onDeselect != null) { onDeselect.actionPerformed(null); } } }
public SplashPanelV2(Icon image, String caption) { super(new BorderLayout()); if (transparentSplash()) setBackground(new Color(255, 255, 255, 0)); JPanel img_panel = new JPanel(new BorderLayout()); JLabel img_label = new JLabel(image /* IconLoader.icon("splash3.png") */); if (transparentSplash()) img_panel.setBackground(new Color(255, 255, 255, 0)); img_panel.add(img_label); txt_panel = new JPanel(new GridBagLayout()); txt_panel.setBackground(Color.white); JLabel cap_label = new JLabel(caption /* "Version 1.0" */); cap_label.setFont(cap_label.getFont().deriveFont(java.awt.Font.BOLD, 20.0f)); cap_label.setForeground(Color.lightGray); // make sure the version string is not wider than the logo img if (cap_label.getPreferredSize().width > img_label.getPreferredSize().width) cap_label.setPreferredSize( new Dimension( img_label.getPreferredSize().width - 20, cap_label.getPreferredSize().height)); // replaced by progressmonitor below JLabel stat_label = new JLabel("some info"); txt_panel.add( cap_label, new GridBagConstraints( 0, 0, 1, 1, 1, 1, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 10), 0, 0)); // txt_panel.add(stat_label, new GridBagConstraints(0, 1, 1, 1, 1, 1, // GridBagConstraints.EAST, GridBagConstraints.NONE, // new Insets(0, 10, 10, 10), 0, 0)); // getContentPane().setBackground(new Color(255, 0, 0)); // setBackground(new Color(0, 255, 0,127)); // contents.setBackground(new Color(0, 0, 255,0)); add(img_panel, BorderLayout.NORTH); add(txt_panel, BorderLayout.SOUTH); int alpha = transparentSplash() ? 0 : 255; setBorder( BorderFactory.createBevelBorder( BevelBorder.RAISED, new Color(255, 255, 255, alpha), new Color(255, 255, 255, alpha), new Color(103, 101, 98, alpha), new Color(148, 145, 140, alpha))); }
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { panelListagem = new javax.swing.JPanel(); setClosable(true); setTitle("Listagem de Tarefas"); setPreferredSize(new java.awt.Dimension(800, 426)); panelListagem.setBorder( javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); panelListagem.setPreferredSize(new java.awt.Dimension(425, 371)); javax.swing.GroupLayout panelListagemLayout = new javax.swing.GroupLayout(panelListagem); panelListagem.setLayout(panelListagemLayout); panelListagemLayout.setHorizontalGroup( panelListagemLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 760, Short.MAX_VALUE)); panelListagemLayout.setVerticalGroup( panelListagemLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 87, Short.MAX_VALUE)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( panelListagem, javax.swing.GroupLayout.DEFAULT_SIZE, 764, Short.MAX_VALUE) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(162, 162, 162) .addComponent( panelListagem, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(144, Short.MAX_VALUE))); pack(); } // </editor-fold>//GEN-END:initComponents
@Override public void queryPerformed(SampleEvent e) { JFreeChart chart = e.getHistogram().getChart(e.getTitle()); if (chartPanel != null) { chartPanel.setChart(chart); } else { chartPanel = new ChartPanel(chart); chartPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); add(chartPanel, BorderLayout.CENTER); } validate(); }
public StatusBar() { status = new JLabel[3]; setLayout(new GridLayout(1, 3)); setPreferredSize(new Dimension(640, 30)); status[0] = new JLabel(); status[0].setPreferredSize(new Dimension(100, 100)); status[0].setBorder(BorderFactory.createBevelBorder(1)); status[0].setHorizontalAlignment(0); status[1] = new JLabel(); status[1].setPreferredSize(new Dimension(100, 100)); status[1].setBorder(BorderFactory.createBevelBorder(1)); status[1].setHorizontalAlignment(0); status[2] = new JLabel(); status[2].setPreferredSize(new Dimension(100, 100)); status[2].setBorder(BorderFactory.createBevelBorder(1)); status[2].setFont(new Font("Monospaced", Font.PLAIN, 12)); status[2].setHorizontalAlignment(0); add(status[0]); add(status[1]); add(status[2]); }
@Override public JComponent createBannerPanel() { BannerPanel headerPanel1 = new BannerPanel( "This is a BannerPanel", "BannerPanel is very useful to display a title, a description and an icon. It can be used in dialog to show some help information or display a product logo in a nice way.", JideIconsFactory.getImageIcon("jide/jide32.png")); headerPanel1.setFont(new Font("Tahoma", 0, 11)); headerPanel1.setBackground(Color.WHITE); headerPanel1.setBorder(BorderFactory.createBevelBorder(1)); return new JPanel(); }
/** * Towrzy domyślny panel z tytułem jako displayName kontaktu. * * @param contact */ public ContactPanel(final ViewContact contact) { super(); this.contact = contact; label = new JLabel(contact.getDisplayName()); this.setOpaque(false); this.setMinimumSize(new Dimension(MainWindow.this.window.getMinimumSize().width, height)); this.setMaximumSize(new Dimension(Integer.MAX_VALUE, height)); this.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); state.setMinimumSize(new Dimension(30, 30)); this.add(state, BorderLayout.WEST); this.add(label, BorderLayout.CENTER); this.setAlignmentX(LEFT_ALIGNMENT); }
Graphic(int width, int height, int ux, int uy) { frameWidth = width; frameHeight = height; unityX = ux; unityY = uy; this.setOpaque(true); this.setPreferredSize(new Dimension(frameWidth, frameHeight)); this.setBorder(BorderFactory.createBevelBorder(1)); instance = this; function = new FunctionGraphic(new MyTestFunction()); }
/** * This method initializes this * * @return void */ @SuppressWarnings("unchecked") private void initialize() { cliente = Cliente.getInstancia(); cliente.comunicar(Comando.OBTENER_CURSO_PROFESOR, ControladorLogin.getIdProfesor()); cursos = (ArrayList<Curso>) cliente.recibir(); cliente.comunicar(Comando.OBTENER_MATERIA_POR_PROFESOR, ControladorLogin.getIdProfesor()); materias = (ArrayList<Materia>) cliente.recibir(); lblNombreProfesor = new JLabel(); lblNombreProfesor.setFocusable(false); lblNombreProfesor.setBorder(null); lblNombreProfesor.setHorizontalAlignment(SwingConstants.CENTER); lblNombreProfesor.setBounds(new Rectangle(1, 23, 688, 23)); lblNombreProfesor.setText("Nombre del Profesor"); lblNombreProfesor.setText(PantallaPrincipalProfesor.getNombre()); lblTitulo = new JLabel(); lblTitulo.setBounds(new Rectangle(1, 0, 688, 18)); lblTitulo.setHorizontalAlignment(SwingConstants.CENTER); lblTitulo.setText("Notas"); lblTitulo.setForeground(Color.WHITE); lblTitulo.setOpaque(true); lblTitulo.setBackground(new Color(72, 129, 191)); lblTitulo.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); lblPeriodo = new JLabel(); lblPeriodo.setBounds(new Rectangle(373, 88, 48, 23)); lblPeriodo.setText("Periodo:"); lblCurso = new JLabel(); lblCurso.setBounds(new Rectangle(373, 59, 48, 23)); lblCurso.setText("Curso:"); lblAsignatura = new JLabel(); lblAsignatura.setBounds(new Rectangle(9, 59, 73, 23)); lblAsignatura.setText("Asignatura:"); this.setSize(690, 463); this.setLayout(null); this.add(lblAsignatura, null); this.add(getCmbMateria(), null); this.add(lblCurso, null); this.add(getCmbCurso(), null); this.add(lblPeriodo, null); this.add(getCmbPeriodo(), null); this.add(lblTitulo, null); this.add(lblNombreProfesor, null); this.add(getJspListaNota(), null); this.add(getBtnGenerarNota(), null); }
private JPanel getJPanelTabuleiro() { if (jPanelTabuleiro == null) { jPanelTabuleiro = new JPanel(); jPanelTabuleiro.setLayout(null); jPanelTabuleiro.setBounds(new Rectangle(167, 101, 500, 500)); jPanelTabuleiro.setLayout(new GridLayout(3, 3)); jPanelTabuleiro.setVisible(true); jPanelTabuleiro.setBorder( BorderFactory.createTitledBorder( BorderFactory.createBevelBorder(BevelBorder.LOWERED), "Tabuleiro", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font("Arial", Font.BOLD, 18), new Color(30, 144, 255))); } return jPanelTabuleiro; }
public JInternalReportFrame( PositionFilterValues filterValues, Vector<StartUPData> searchCriteria, Vector<StartUPData> searchColumn, String reportType) { setFilterValues(filterValues); setSearchCriteria(searchCriteria); setSearchColumn(searchColumn); setVisible(true); setReportType(reportType); setLayout(new GroupLayout()); filters = new Vector<FilterBean>(); javax.swing.plaf.InternalFrameUI ifu = this.getUI(); ((javax.swing.plaf.basic.BasicInternalFrameUI) ifu).setNorthPane(null); setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, null, null, null, null)); add(getJToolBar1(), new Constraints(new Bilateral(8, 11, 2), new Leading(6, 26, 17, 17))); add(getJPanel1(), new Constraints(new Bilateral(8, 10, 0), new Bilateral(38, 11, 55))); }
public ContactFileEditor(GemDesktop _desktop) { super(_desktop); note = new GemLabel(); note.setForeground(java.awt.Color.red); personView = new PersonView(); infosView = new GemPanel(); infosView.setBorder(BorderFactory.createMatteBorder(0, 1, 0, 0, Color.lightGray)); teleView = new TelView( ParamTableIO.find(Category.TELEPHONE.getTable(), Category.TELEPHONE.getCol(), dc)); emailView = new EmailView(); websiteView = new WebSiteView( ParamTableIO.find(Category.SITEWEB.getTable(), Category.SITEWEB.getCol(), dc)); infosView.setLayout(new BoxLayout(infosView, BoxLayout.Y_AXIS)); infosView.add(teleView); infosView.add(emailView); infosView.add(websiteView); JScrollPane scp = new JScrollPane(infosView); scp.setBorder(null); scp.setPreferredSize(new Dimension(400, scp.getPreferredSize().height)); GemPanel addressPanel = new GemPanel(); addressPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); addressView = new AddressView(); addressView.setBorder(null); addressPanel.add(addressView, BorderLayout.SOUTH); this.setLayout(new GridBagLayout()); gb = new GridBagHelper(this); GemBorderPanel gp = new GemBorderPanel(new BorderLayout()); gp.add(personView, BorderLayout.WEST); gp.add(scp, BorderLayout.EAST); gb.add(gp, 0, 0, 1, 1, GridBagHelper.BOTH, 1.0, 1.0); gb.add(addressPanel, 0, 2, 1, 1, GridBagHelper.BOTH, GridBagHelper.WEST); gb.add(note, 0, 3, 1, 1, GridBagHelper.HORIZONTAL, GridBagHelper.WEST); }
Title(String title) { super(); setText(title); setHorizontalAlignment(SwingConstants.CENTER); setBorder( BorderFactory.createBevelBorder( BevelBorder.RAISED, UIManager.getColor("activeCaptionBorder"), UIManager.getColor("inactiveCaptionBorder"))); // Forward mouse events to titlebar for moves. addMouseMotionListener( new MouseMotionListener() { public void mouseDragged(MouseEvent e) { forwardEventToParent(e); } public void mouseMoved(MouseEvent e) { forwardEventToParent(e); } }); addMouseListener( new MouseListener() { public void mouseClicked(MouseEvent e) { forwardEventToParent(e); } public void mousePressed(MouseEvent e) { forwardEventToParent(e); } public void mouseReleased(MouseEvent e) { forwardEventToParent(e); } public void mouseEntered(MouseEvent e) { forwardEventToParent(e); } public void mouseExited(MouseEvent e) { forwardEventToParent(e); } }); }
private SourceCode() { this.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); this.setLocation(OFFSET_FROM_RIGHT - MIN_WIDTH, OFFSET_FROM_BOTTOM - BUTTON_HEIGHT); this.setSize(new Dimension(MIN_WIDTH, MIN_HEIGHT)); this.setPreferredSize(new Dimension(MIN_WIDTH, MIN_HEIGHT)); this.setLayout(null); smallButtonFont = this.getFont().deriveFont(Font.PLAIN, 9.0f); this.enlarger = new SourceCodeEnlargerTimer(); createHideCodeButton(); createCompileButton(); prepareCodeRegion(); add(codeButton); add(compileButton); add(paneJavaCode.getWrappingContainerWithLines()); Workspace.getInstance().addComponentListener(this); }
public ContentPanel() { super(new BorderLayout()); gamePanel = new GamePanel(); add(gamePanel, BorderLayout.NORTH); logger = new Logger(); logger.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); logger.setEditable(false); JScrollPane scrollPane = new JScrollPane( logger, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setBorder(BorderFactory.createTitledBorder("Logger:")); add(scrollPane, BorderLayout.CENTER); }