public CollisionBoxPanel() { TitledBorder border = new TitledBorder(new LineBorder(new Color(128, 128, 128)), Resources.get("panel_collisionBox"), TitledBorder.LEADING, TitledBorder.TOP, null, null); border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD)); setBorder(border); chckbxIsObstacle = new JCheckBox(Resources.get("panel_isObstacle")); GroupLayout groupLayout = new GroupLayout(this); groupLayout.setHorizontalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addContainerGap() .addComponent(chckbxIsObstacle, GroupLayout.PREFERRED_SIZE, 108, GroupLayout.PREFERRED_SIZE) .addContainerGap(322, Short.MAX_VALUE))); groupLayout.setVerticalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addComponent(chckbxIsObstacle, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE) .addContainerGap(258, Short.MAX_VALUE))); setLayout(groupLayout); this.setupChangedListeners(); }
/** Creates a new instance of FoldingToolTip */ public FoldingToolTip(View view, EditorUI editorUI) { this.view = view; this.editorUI = editorUI; FontColorSettings fcs = MimeLookup.getLookup( org.netbeans.lib.editor.util.swing.DocumentUtilities.getMimeType( editorUI.getComponent())).lookup(FontColorSettings.class); AttributeSet attribs = fcs.getFontColors(FontColorNames.DEFAULT_COLORING); Color foreColor = (Color) attribs.getAttribute(StyleConstants.Foreground); if (foreColor == null) { foreColor = Color.black; } setBorder(new LineBorder(foreColor)); setOpaque(true); }
@Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { JComponent c = (JComponent)super.getTableCellEditorComponent(table, value, isSelected, row, column); cell.setText((String) value); this.orig = cell.getTextField().getText(); this.action = ((ActionHolder) table.getValueAt(row, 0)).getAction(); final JTextField textField = cell.getTextField(); textField.addActionListener(delegate); textField.setBorder(new LineBorder(Color.BLACK)); if(!Arrays.asList(textField.getKeyListeners()).contains(escapeAdapter)) { textField.addKeyListener(escapeAdapter); } // allow the UI delegate to replace the background with more sensible color cell.setBgColor(c.getBackground()); cell.setFgCOlor(c.getForeground(), false); SwingUtilities.invokeLater(new Runnable() { public void run() { textField.requestFocus(); } }); return cell; }
void setHighlighted() { if (!isMac) { setBorder(new CompoundBorder( new CompoundBorder( new LineBorder(getTabPanelBackground()), new LineBorder(highlightedB) ), new EmptyBorder(0, 2, 0, 2) )); setBackground(highlighted); } if (!category.isHighlited()) { if (categoryModel.getHighlitedCategoryID() != null) { CategoryButton b = buttons.get(categoryModel.getHighlitedCategoryID()); if (b != null && !b.category.isCurrent()) { b.setNormal(); } } categoryModel.setHighlited(category,true); } }
@Override public Component prepareRenderer(TableCellRenderer renderer, int row, int column) { Component c = super.prepareRenderer(renderer, row, column); if (getModel().hasUpdates( convertRowIndexToModel(row), convertColumnIndexToModel(column))) { Color color = isCellSelected(row, column) ? selectedForeground : unselectedForeground; if (c instanceof JCheckBox) { checkboxReplacement.removeAll(); checkboxReplacement.setBorder(new LineBorder(color, borderThickness)); checkboxReplacement.add(c); return checkboxReplacement; } else { c.setForeground(color); return c; } } return c; }
private void destacarCampo(JFormattedTextField field) { final int timerDelay = 500; final int totalTime = 2000; final int totalCount = totalTime / timerDelay; Timer timer = new Timer(timerDelay, new ActionListener(){ int count = 0; public void actionPerformed(ActionEvent evt) { if (count % 2 == 0) { field.setBorder(new LineBorder(Color.RED, 2, true)); field.requestFocus(); } else { field.setBorder(new LineBorder(Color.GRAY, 1, false)); if (count >= totalCount) { ((Timer)evt.getSource()).stop(); } } count++; } }); timer.start(); }
/** * Create the ButtonCellRenderer to be used as a renderer and editor. The * renderer and editor will automatically be installed on the TableColumn of * the specified column. * * @param table the table containing the button renderer/editor * @param action the Action to be invoked when the button is invoked * @param column the column to which the button renderer/editor is added */ public ButtonCellRenderer(JTable table, Action action, int column) { this.table = table; this.action = action; renderButton = new JButton(); editButton = new JButton(); editButton.setFocusPainted(false); editButton.addActionListener(this); originalBorder = editButton.getBorder(); setFocusBorder(new LineBorder(Color.BLUE)); TableColumnModel columnModel = table.getColumnModel(); columnModel.getColumn(column).setCellRenderer(this); columnModel.getColumn(column).setCellEditor(this); table.addMouseListener(this); }
/** * Constructs a new OptionTextArea with the text given. * * @param content * The content written onto this area. * @param manager * The style manager used to handle colors. */ public OptionTextArea(final String content, final StyleManager manager) { super(content); // Add a little margin to the left, so the content of this text area // doesn't cling to its edge. this.setBorder( BorderFactory.createCompoundBorder(LineBorder.createBlackLineBorder(), new EmptyBorder(0, 2, 0, 0))); // This isn't a good solution. We just set our preferred width to 1 so // the layout manager managing this component doesn't try to resize it // beyond its own "fill" parameter, since 1 < fill. This maintains a // stable size of this text area and won't deform the layout if the // input query is too long. this.setPreferredSize(new Dimension(1, (int) (Window.TEXT_AREA_FONT.getSize() * 1.3f))); this.setFont(Window.TEXT_AREA_FONT); this.mManager = manager; this.setBackground(manager.getTextAreaColor()); this.setForeground(manager.getDefaultFontColor()); }
@Override public boolean stopCellEditing() { final String s = (String) super.getCellEditorValue(); if ("".equals(s)) { return super.stopCellEditing(); } try { value = format.parse(s); if (value instanceof Long) value = new Double(value.toString()); else if (value instanceof Integer) value = new Double(value.toString()); } catch (final Exception e) { ((JComponent) getComponent()).setBorder(new LineBorder( Color.red)); return false; } return super.stopCellEditing(); }
@Override public Component getTableCellEditorComponent(final JTable table, Object value, final boolean isSelected, final int row, final int column) { this.value = null; ((JComponent) getComponent()) .setBorder(new LineBorder(Color.black)); if (value != null) { try { value = format.format(value); } catch (Exception e) { e.printStackTrace(); } } Component tableCellEditorComponent = super.getTableCellEditorComponent(table, value, isSelected, row, column); if (tableCellEditorComponent instanceof JTextField) { ((JTextField) tableCellEditorComponent).selectAll(); } return tableCellEditorComponent; }
@Override public boolean stopCellEditing() { final String s = (String) super.getCellEditorValue(); if ("".equals(s)) { return super.stopCellEditing(); } try { value = new Long(s); } catch (final Exception e) { ((JComponent) getComponent()).setBorder(new LineBorder( Color.red)); return false; } return super.stopCellEditing(); }
@Override public boolean stopCellEditing() { final String s = (String) super.getCellEditorValue(); if ("".equals(s)) { return super.stopCellEditing(); } try { value = format.parse(s); if (value instanceof Long) value = new Double(value.toString()); else if (value instanceof Integer) value = new Double(value.toString()); } catch (final Exception e) { ((JComponent) getComponent()).setBorder(new LineBorder(Color.red)); return false; } return super.stopCellEditing(); }
public RelationTypeTestsPanel() { setBorder(new TitledBorder(new LineBorder(new Color(184, 207, 229)), "Relation tests", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(51, 51, 51))); setLayout(new BorderLayout()); tests = new WebList(); MButtonPanel buttonsPanel = new MButtonPanel(moveUpButton, moveDownButton, addButton, editButton, removeButton) .withVerticalLayout() .withAllButtonsEnabled(true) .withMargin(10); add(new WebScrollPane(tests), BorderLayout.CENTER); add(buttonsPanel, BorderLayout.EAST); }
private void init() { setBorder(new TitledBorder(new LineBorder(new Color(184, 207, 229)), "Relation properties", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(51, 51, 51))); WebScrollPane descriptionScrollWrapper = new WebScrollPane(relationDescription); setLayout(new RiverLayout()); colorChooser.setPipetteEnabled(false); colorChooser.setFieldType(ColorChooserFieldType.hex); add(LINE_BREAK + " " + RIGHT, nameLabel); add(TAB_FILL, relationName); add(LINE_BREAK, displayLabel); add(TAB_FILL, relationDisplay); add(LINE_BREAK, shortcutLabel); add(TAB_FILL, relationShortcut); add(LINE_BREAK, descriptionLabel); add(TAB_FILL, descriptionScrollWrapper); add(LINE_BREAK, lexiconLabel); add(TAB_FILL, lexicon); add(RIGHT, lexiconBtn); add(LINE_BREAK, multilingualLabel); add(TAB_FILL, multilingual); add(LINE_BREAK, posLabel); add(TAB_FILL, allowedPartsOfSpeech); add(RIGHT, showAllowedPartsOfSpeechBtn); add(LINE_BREAK, reverseLabel); add(TAB_FILL, reverseRelation); add(RIGHT, reverseRelationBtn); add(LINE_BREAK, colorLabel); add(TAB_FILL, colorChooser); add(LINE_BREAK, directionLabel); add(TAB_FILL, relationDirection); add(RiverLayout.LINE_BREAK + " " + RiverLayout.CENTER, btnSave); }
@Override public void addCustomEntriesToTable(UIDefaults table) { Border blackLineBorder = new BorderUIResource(new LineBorder(getBlack())); Border whiteLineBorder = new BorderUIResource(new LineBorder(getWhite())); Object textBorder = new BorderUIResource(new CompoundBorder( blackLineBorder, new BasicBorders.MarginBorder())); table.put("ToolTip.border", blackLineBorder); table.put("TitledBorder.border", blackLineBorder); table.put("Table.focusCellHighlightBorder", whiteLineBorder); table.put("Table.focusCellForeground", getWhite()); table.put("TextField.border", textBorder); table.put("PasswordField.border", textBorder); table.put("TextArea.border", textBorder); table.put("TextPane.font", textBorder); }
/** * Preencher a janela para escolher o verso do card * * @param selected verso pré-selecionado. -1 para nenhum verso * pré-selecionado. */ private void preencher(int selected) { for (int i = 0; i < CARDBACK.size(); i++) { ImageIcon cardBack = Img.recortar(CARDBACK.get(i).getCardBackImage(), 20, 45, 164, 240); cardBack = Img.redimensionaImg(cardBack.getImage(), 0.55); JToggleButton button = new JToggleButton(cardBack); button.addActionListener(getAction(i)); button.setBorder(null); button.setBackground(new Color(0, 0, 0, 0)); button.setOpaque(false); button.setFocusPainted(false); buttonGroup.add(button); if (i == selected) { button.setBorder(new LineBorder(Color.RED, 2)); button.setSelected(true); } jPanelCards.add(button); } }
public DatabaseViewer() { selectedDatabaseViewer = new SelectedDatabaseViewer(); tablesViewer = new TablesViewer(); selectedTableViewer = new SelectedTableViewer(); setLayout(new BorderLayout()); JScrollPane tablesSP = new JScrollPane(tablesViewer); tablesSP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); tablesSP.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, tablesSP, selectedTableViewer); splitPane.setResizeWeight(SPLIT_WEIGHT); selectedDatabaseViewer.setBorder(BorderFactory.createEmptyBorder(DBVIEWER_TOP_PADDING, 0, 0, 0)); add(selectedDatabaseViewer, BorderLayout.NORTH); add(splitPane, BorderLayout.CENTER); LineBorder lineBorderPanel = (LineBorder) BorderFactory.createLineBorder(PANEL_BORDER_COLOR); setBorder(BorderFactory.createTitledBorder(lineBorderPanel, PANEL_TITLE)); setListeners(); }
/** * Create the frame. */ public TypeWizard(final Graph graph, final Object onWhat, final List<Object> list) { this.graph = graph; this.onWhat = onWhat; this.setTitle("Change Atom Type Wizard"); this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); this.setBounds(100, 100, 450, 300); this.getContentPane().setLayout(new BorderLayout(0, 0)); final JScrollPane scrollPane = new JScrollPane(); this.getContentPane().add(scrollPane, BorderLayout.CENTER); this.list = new JList<Object>(); this.list.setFont(new Font("Times New Roman", Font.PLAIN, 12)); this.list.setBorder(new LineBorder(new Color(0, 0, 0))); this.list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); this.list.setModel(new TypeListModel(list)); scrollPane.setViewportView(this.list); final JPanel buttonPanel = new JPanel(); this.getContentPane().add(buttonPanel, BorderLayout.SOUTH); buttonPanel.setLayout(new BorderLayout(0, 0)); this.finishButton = new JButton("Finish"); this.finishButton.setFont(new Font("Times New Roman", Font.PLAIN, 12)); this.finishButton.setMnemonic('F'); buttonPanel.add(this.finishButton, BorderLayout.EAST); this.finishButton.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent arg) { TypeWizard.this.performFinish(); GraphUtil.getInstance().layout(); TypeWizard.this.dispose(); } }); }
/** * set up the thumb image UI * * @param f * @return */ JPanel getPanel(final String f) { setThumbImage(f); JPanel p = new JPanel() { @Override public void paintComponent(Graphics g) { g.drawImage(thumbs.get(f), 0, 0, null); } }; p.setPreferredSize(THUMB_SIZE); p.setBorder(new LineBorder(Color.LIGHT_GRAY, 3)); JComponent c = getThumbSelector(f); JComponent cl = setupThumbClose(p); setupAlignment(p, c, cl); p.setName(f); p.addMouseListener(thumbselected); p.addMouseListener(Listeners.thumbPrevFocus); thumbList.add(p); return p; }
private void run() { JFrame frame = new JFrame("Test Character (no crash = PASS)"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel panel = new JPanel(); final JLabel label = new JLabel("(empty)"); label.setSize(400, 100); label.setBorder(new LineBorder(Color.black)); label.setFont(new Font("Lucida Bright", Font.PLAIN, 12)); if(AUTOMATIC_TEST) { /* run the test automatically (else, manually) */ label.setText(Character.toString('\u0DDD')); } else { JButton button = new JButton("Set Char x0DDD"); button.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent actionEvent) { label.setText(Character.toString('\u0DDD')); } }); panel.add(button); } panel.add(label); frame.getContentPane().add(panel); frame.pack(); frame.setVisible(true); }
private void printCaptionWeek(JLabel label, int day, GregorianCalendar gc) { ((JPanel) (label.getParent())).setBorder(new LineBorder(Color.DARK_GRAY, 5)); gc.set(GregorianCalendar.DAY_OF_WEEK, day); final GregorianCalendar now = new GregorianCalendar(); SimpleDateFormat format_dd_MMMM_yyyy = new SimpleDateFormat("dd MMMM yyyy", Locales.getInstance().getLangCurrent()); if (now.get(GregorianCalendar.DAY_OF_MONTH) == gc.get(GregorianCalendar.DAY_OF_MONTH) && now.get(GregorianCalendar.DAY_OF_WEEK) == gc.get(GregorianCalendar.DAY_OF_WEEK) && now.get(GregorianCalendar.DAY_OF_YEAR) == gc.get(GregorianCalendar.DAY_OF_YEAR)) { label.setText( "<html><p align=center><span style='font-size:22.0pt;color:red'>" + getNameWeekDay( gc.getTime()) + "<br/></span><span style='font-size:22.0pt;color:red'>" + format_dd_MMMM_yyyy.format(gc.getTime())); } else { label.setText( "<html><p align=center><span style='font-size:22.0pt;color:blue'>" + getNameWeekDay( gc.getTime()) + "<br/></span><span style='font-size:18.0pt;color:black'>" + format_dd_MMMM_yyyy.format(gc.getTime())); } }
public StaticShadowPanel() { TitledBorder border = new TitledBorder(new LineBorder(new Color(128, 128, 128)), Resources.get("panel_staticShadow"), TitledBorder.LEADING, TitledBorder.TOP, null, null); border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD)); setBorder(border); JLabel lblShadowType = new JLabel(Resources.get("panel_shadowType")); comboBoxShadowType = new JComboBox<>(); comboBoxShadowType.setModel(new DefaultComboBoxModel<StaticShadowType>(StaticShadowType.values())); GroupLayout groupLayout = new GroupLayout(this); groupLayout.setHorizontalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addContainerGap() .addComponent(lblShadowType, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE) .addGap(10) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addComponent(comboBoxShadowType, 0, 95, Short.MAX_VALUE) .addGap(4))))); groupLayout.setVerticalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) .addComponent(comboBoxShadowType, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE) .addComponent(lblShadowType, GroupLayout.PREFERRED_SIZE, 13, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); setLayout(groupLayout); this.setupChangedListeners(); }
/** * Created by Kevin Le to stylize buttons to all look the same * Edited by me to allow for toggle buttons to be stylized * @param b */ public void stylizeToggleButton(JToggleButton b){ Border thickBorder = new LineBorder(Color.WHITE, 3); b.setBorder(thickBorder); b.setContentAreaFilled(false); b.setOpaque(true); b.setBackground(Color.BLACK); b.setForeground(Color.WHITE); }
public EmitterPanel() { TitledBorder border = new TitledBorder(new LineBorder(new Color(128, 128, 128)), Resources.get("panel_emitter"), TitledBorder.LEADING, TitledBorder.TOP, null, null); border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD)); setBorder(border); JLabel lblShadowType = new JLabel(Resources.get("panel_emitterType")); textFieldType = new JTextField(); textFieldType.setColumns(10); GroupLayout groupLayout = new GroupLayout(this); groupLayout.setHorizontalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addContainerGap() .addComponent(lblShadowType, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(textFieldType, GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE) .addContainerGap())); groupLayout.setVerticalGroup( groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup() .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) .addComponent(lblShadowType, GroupLayout.PREFERRED_SIZE, 13, GroupLayout.PREFERRED_SIZE) .addComponent(textFieldType, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); setLayout(groupLayout); this.setupChangedListeners(); }
/** * Created by Kevin Le to stylize buttons to all look the same * @param b */ public void stylizeButton(JButton b){ Border thickBorder = new LineBorder(Color.WHITE, 3); b.setBorder(thickBorder); b.setContentAreaFilled(false); b.setOpaque(true); b.setBackground(Color.BLACK); b.setForeground(Color.WHITE); }
@Override protected PropertyDescriptor[] createPropertyDescriptors() throws IntrospectionException { return new PropertyDescriptor[] { createRO(LineBorder.class, "lineColor"), // NOI18N createRO(LineBorder.class, "thickness"), // NOI18N createRO(LineBorder.class, "roundedCorners"), // NOI18N }; }
public BraceToolTip(JEditorPane editorPane, JEditorPane previewPane) { this.previewPane = previewPane; setLayout(new BorderLayout()); add(previewPane, BorderLayout.CENTER); putClientProperty("tooltip-type", "fold-preview"); // Checked in NbToolTip addGlyphGutter(previewPane); editorPaneWidth = editorPane.getSize().width; Color foreColor = previewPane.getForeground(); setBorder(new LineBorder(foreColor)); setOpaque(true); }
public void stylizeButton(JButton b){ Border thickBorder = new LineBorder(Color.WHITE, 3); b.setBorder(thickBorder); b.setContentAreaFilled(false); b.setOpaque(true); b.setBackground(Color.BLACK); b.setForeground(Color.WHITE); }
protected Border createInstanceImpl() { Color c = lineColor == null ? null : lineColor.createInstance(); if (c == null) c = Color.BLACK; if (roundedCorners) { return new LineBorder(c, thickness, roundedCorners); } else if (thickness == 1) { return BorderFactory.createLineBorder(c); } else { return BorderFactory.createLineBorder(c, thickness); } }
private static void stylize(JButton button){ Border thickBorder = new LineBorder(Color.WHITE, 3); button.setFont(new Font(button.getFont().getName(),Font.PLAIN,14)); button.setBorder(thickBorder); button.setContentAreaFilled(false); button.setOpaque(true); button.setBackground(Color.BLACK); button.setForeground(Color.WHITE); }
@Override public void addNotify() { super.addNotify(); // In GTK L&F the border of the toolbar looks raised. It does not help to set null border // nor setting EmptyBorder helps. Curent solution is to set one-pixel LineBorder // which overwrites the "raising line". setBorder(new LineBorder(getBackground(), 1)); }
/** * Constructs a new tree panel which handles drawing of the current tree. * * @param window * The window used for position related information. * * @param manager * The style manager used to handle colors. */ public TreePanel(final Window window, final StyleManager manager) { this.mWindow = window; this.mHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); this.mHints.put(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY); this.mHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); this.mHints.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); this.mManager = manager; this.addMouseMotionListener(this); this.setPreferredSize(window.getTreePanelSize()); this.setBorder(LineBorder.createBlackLineBorder()); this.setBackground(manager.getTreepanelColor()); }
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel label = new JLabel(stationData.getStationName(value), JMTImageLoader.loadImage(stationData.getStationType(value) + "Combo"), SwingConstants.LEFT); label.setOpaque(true); label.setBorder(new LineBorder(cellHasFocus ? Color.BLUE : Color.WHITE)); label.setBackground(isSelected ? list.getSelectionBackground() : Color.WHITE); label.setForeground(isSelected ? list.getSelectionForeground() : Color.BLACK); label.setFont(isSelected ? label.getFont().deriveFont(Font.BOLD) : label.getFont().deriveFont(Font.ROMAN_BASELINE)); return label; }
@Override public Component getTableCellEditorComponent(final JTable table, Object value, final boolean isSelected, final int row, final int column) { this.value = null; ((JComponent) getComponent()) .setBorder(new LineBorder(Color.black)); if (value != null) value = String.valueOf(value); return super.getTableCellEditorComponent(table, value, isSelected, row, column); }