public AboutDialog(JFrame parent) { this.setResizable(false); this.setSize(new Dimension(400, 250)); this.getContentPane().setLayout(new BorderLayout(0, 0)); JLabel lblResizer = new JLabel(Localization.get("app_name") + " " + Configuration.getVersion()); lblResizer.setBorder(new EmptyBorder(10, 10, 10, 10)); lblResizer.setVerticalTextPosition(SwingConstants.BOTTOM); lblResizer.setIconTextGap(10); lblResizer.setFont(lblResizer.getFont().deriveFont( lblResizer.getFont().getStyle() | Font.BOLD, 16f)); lblResizer.setIcon(new ImageIcon(AboutDialog.class .getResource("/img/icon_64.png"))); this.getContentPane().add(lblResizer, BorderLayout.NORTH); JTextArea txtrResizerIsA = new JTextArea(); txtrResizerIsA.setEditable(false); txtrResizerIsA.setWrapStyleWord(true); txtrResizerIsA.setBorder(new EmptyBorder(0, 10, 10, 10)); txtrResizerIsA.setFont(UIManager.getFont("Label.font")); txtrResizerIsA.setLineWrap(true); txtrResizerIsA.setText(Localization.get("about_text")); txtrResizerIsA.setBackground(new Color(0, 0, 0, 0)); this.getContentPane().add(txtrResizerIsA, BorderLayout.CENTER); this.setLocationRelativeTo(parent); }
private Component text() { license = new JTextArea(); license.setFont(getFont()); license.setBackground(getBackground()); license.setEditable(false); license.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createLineBorder(Color.GRAY), emptyBorder())); return license; }
/** 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() { popupText = new javax.swing.JTextArea(); setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); setLayout(new java.awt.BorderLayout()); popupText.setBackground(new java.awt.Color(204, 204, 204)); popupText.setColumns(20); popupText.setEditable(false); popupText.setLineWrap(true); popupText.setRows(1); popupText.setWrapStyleWord(true); popupText.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 2, 2, 2)); add(popupText, java.awt.BorderLayout.PAGE_START); }// </editor-fold>//GEN-END:initComponents
tm.setWrapStyleWord(true); tm.setEditable(false); tm.setBackground(new JLabel().getBackground()); JPanel pnl = new JPanel(); pnl.setLayout(new BoxLayout(pnl, BoxLayout.Y_AXIS));
area.setBackground(UIManager.getColor("Label.background")); // NOI18N area.setBorder(BorderFactory.createEmptyBorder()); area.setLineWrap(true);
private void setString(String s) { txtResult.setText(s); txtResult.setBackground(SystemColor.control); }
public void setString(String s) { txtResult.setText(s); txtResult.setBackground(SystemColor.control); }
private void setError(Throwable ex) { String exStr = ExceptionFormatter.getFullString(ex); txtResult.setText(exStr); txtResult.setBackground(Color.pink); }
private void setGeometry(Geometry g) { String str = tbModel.getResultDisplayString(g); txtResult.setText(str); txtResult.setBackground(SystemColor.control); }
public void setError(Throwable ex) { String exStr = ExceptionFormatter.getFullString(ex); txtResult.setText(exStr); txtResult.setBackground(Color.pink); }
public JTextArea getSimpleTextArea(String text) { JTextArea area = new JTextArea(text); area.setEditable(false); area.setWrapStyleWord(true); area.setLineWrap(true); area.setBackground(AppThemeColor.TRANSPARENT); area.setBorder(null); area.setFont(REGULAR_FONT.deriveFont(scale * 16f)); area.setForeground(AppThemeColor.TEXT_DEFAULT); return area; }
JTextArea txt = new JTextArea(); //Set background black txt.setBackground(Color.BLACK); //Set Foreground(text) white txt.setForeground(Color.WHITE);
setLayout(null); //change jpanel layout to null JTextArea name_field=new JTextArea(1,10); name_field.setBackground(color); name_field.setBounds(100,100,600,420); name_field.setLineWrap(true); add(name_field);
/** Creates new form ConfigurationWarningPanel */ public ConfigurationWarningPanel(String msg) { initComponents(); messageTextarea.setBackground(new Color(getBackground().getRGB())); messageTextarea.setText(msg); }
private void setFocusGeometry(int index) { JTSTestBuilder.controller().setFocusGeometry(index); JTextArea focusTA = index == 0 ? aTextArea : bTextArea; JTextArea otherTA = index == 0 ? bTextArea : aTextArea; //focusTA.setBorder(focusBorder); //otherTA.setBorder(otherBorder); focusTA.setBackground(focusBackgroundColor); otherTA.setBackground(otherBackgroundColor); repaint(); }
void jbInit() throws Exception { this.setLayout(tabPanelLayout); txtStats.setWrapStyleWord(true); txtStats.setLineWrap(true); txtStats.setBackground(SystemColor.control); this.add(jScrollPane1, BorderLayout.CENTER); jScrollPane1.setBorder(BorderFactory.createLoweredBevelBorder()); jScrollPane1.getViewport().add(txtStats, null); }
void jbInit() throws Exception { this.setLayout(tabPanelLayout); txtInfo.setWrapStyleWord(true); txtInfo.setLineWrap(true); txtInfo.setBackground(SystemColor.control); this.add(jScrollPane1, BorderLayout.CENTER); jScrollPane1.setBorder(BorderFactory.createLoweredBevelBorder()); jScrollPane1.getViewport().add(txtInfo, null); }
/** * This is called when the input color is changed so that all input is added with the * AttributeSet (Style) that has been specified for input. */ private void setInputAttribute() { inputControl.setInputAttributeSet(consoleStyledDocument.getStyle(inputColor)); if (!useInlineInput) { inputArea.setForeground(getStyleColorFromCode(inputColor.charAt(0))); // Foreground inputArea.setBackground(getStyleColorFromCode(inputColor.charAt(1))); // Background } }
private void setBackgroundColors() { shellPreview.setBackground(themeData.getColor(ThemeData.SHELL_BACKGROUND_COLOR)); shellPreview.setSelectionColor(themeData.getColor(ThemeData.SHELL_SELECTED_BACKGROUND_COLOR)); historyPreview.setBackground(themeData.getColor(ThemeData.SHELL_HISTORY_BACKGROUND_COLOR)); historyPreview.setSelectionBackground(themeData.getColor(ThemeData.SHELL_HISTORY_SELECTED_BACKGROUND_COLOR)); }