本文整理了Java中javax.swing.JScrollPane.setBackground()
方法的一些代码示例,展示了JScrollPane.setBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.setBackground()
方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:setBackground
暂无
代码示例来源:origin: libgdx/libgdx
private void uiStyle () {
contentPane.setBackground(new Color(36, 36, 36));
topPanel.setBackground(new Color(36, 36, 36));
topPanel.setForeground(new Color(255, 255, 255));
table.setBackground(new Color(46, 46, 46));
table.setForeground(new Color(255, 255, 255));
bottomPanel.setBackground(new Color(36, 36, 36));
bottomPanel.setForeground(new Color(255, 255, 255));
buttonPanel.setBackground(new Color(36, 36, 36));
buttonPanel.setForeground(new Color(255, 255, 255));
scrollPane.setBorder(BorderFactory.createEmptyBorder());
scrollPane.setBackground(new Color(36, 36, 36));
scrollPane.getViewport().setBackground(new Color(36, 36, 36));
warningNotice.setForeground(new Color(255, 20, 20));
warningNotice2.setForeground(new Color(255, 20, 20));
}
代码示例来源:origin: runelite/runelite
resultsWrapper.setBackground(ColorScheme.DARK_GRAY_COLOR);
resultsWrapper.getVerticalScrollBar().setPreferredSize(new Dimension(12, 0));
resultsWrapper.getVerticalScrollBar().setBorder(new EmptyBorder(0, 5, 0, 0));
代码示例来源:origin: runelite/runelite
scroller.getVerticalScrollBar().setPreferredSize(new Dimension(16, 0));
scroller.getVerticalScrollBar().setBorder(new EmptyBorder(0, 9, 0, 0));
scroller.setBackground(ColorScheme.DARK_GRAY_COLOR);
代码示例来源:origin: magefree/mage
/**
*
* Creates new form ChatPanel
*
*/
public ChatPanelBasic() {
initComponents();
setBackground(new Color(0, 0, 0, CHAT_ALPHA));
changeGUISize(GUISizeHelper.chatFont);
if (jScrollPaneTxt != null) {
jScrollPaneTxt.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPaneTxt.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPaneTxt.setViewportBorder(null);
}
}
代码示例来源:origin: magefree/mage
textAreaScrollPane.setBackground(new Color(0, 0, 0, 0));
textAreaScrollPane.getViewport().setOpaque(false);
textAreaScrollPane.setBorder(null);
代码示例来源:origin: bobbylight/RSyntaxTextArea
sp.setBorder(emptyBorder);
sp.setViewportBorder(emptyBorder);
sp.setBackground(textArea.getBackground());
sp.getViewport().setBackground(textArea.getBackground());
cp.add(sp);
代码示例来源:origin: magefree/mage
public PlayersChatPanel() {
userTableModel = new UserTableModel(); // needs to be set before initComponents();
initComponents();
setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jTablePlayers.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jTablePlayers.setForeground(Color.white);
jTablePlayers.setRowSorter(new MageTableRowSorter(userTableModel));
setGUISize();
TableUtil.setColumnWidthAndOrder(jTablePlayers, tableInfo.getColumnsWidth(), KEY_USERS_COLUMNS_WIDTH, KEY_USERS_COLUMNS_ORDER);
jTablePlayers.setDefaultRenderer(Icon.class, new CountryCellRenderer());
jScrollPaneTalk.setSystemMessagesPane(colorPaneSystem);
jScrollPaneTalk.setOpaque(false);
jScrollPaneSystem.getViewport().setOpaque(false);
jScrollPaneSystem.setViewportBorder(null);
colorPaneSystem.setExtBackgroundColor(new Color(0, 0, 0, CHAT_ALPHA)); // Alpha = 255 not transparent
colorPaneSystem.setBorder(new EmptyBorder(5, 5, 5, 5));
if (jScrollPanePlayers != null) {
jScrollPanePlayers.setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPanePlayers.getViewport().setBackground(new Color(0, 0, 0, CHAT_ALPHA));
jScrollPanePlayers.setViewportBorder(null);
}
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
/**
* Allows the background color to the menu (left side) to be set
* @param color Sets the background color to the menu
*/
public void setMenuScrollColor(Color color) {
this.menuScroll.setBackground(color);
}
代码示例来源:origin: stackoverflow.com
JScrollPane listPane = new JScrollPane();
pane.add(listPane, BorderLayout.CENTER);
listPane.setBackground(Color.LIGHT_GRAY);
listPane.setBorder(new EmptyBorder(0, 20, 0, 0));
listPane.setViewportView(fileList);
// removed add line
代码示例来源:origin: sc.fiji/TrakEM2_
private Component wrap(Component c, String title) {
JScrollPane s = new JScrollPane(c);
s.setBackground(Color.white);
s.setMinimumSize(new Dimension(400,15));
s.setPreferredSize(new Dimension(400,200));
s.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(0,5,0,5), title));
return s;
}
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
@Override
public void setBackground(Color aValue) {
super.setBackground(aValue);
}
代码示例来源:origin: com.github.tornaia/aott-desktop-client-core
public JPanel createProcessTreePanel() {
this.loadingLabel = new JLabel("Loading data...");
this.jScrollPane = new JScrollPane();
jScrollPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
jScrollPane.setBackground(ColorConst.CONTENT_BACKGROUND);
this.jPanel = new JPanel(new GridLayout());
jPanel.add(jScrollPane);
jPanel.setBackground(ColorConst.CONTENT_BACKGROUND);
setStateLoading();
return this.jPanel;
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
private void configurarCores(){
divisorLayout.setBackground(ColorController.COR_DESTAQUE);
painelAjuda.setBackground(ColorController.COR_DESTAQUE);
scrollConteudo.setBackground(ColorController.COR_DESTAQUE);
painelArvore.setBackground(ColorController.FUNDO_CLARO);
painelCarregamento.setBackground(ColorController.COR_DESTAQUE);
rotuloCarregamento.setForeground(ColorController.COR_LETRA);
rotuloErroCarregamento.setForeground(ColorController.COR_LETRA);
jLabel2.setForeground(ColorController.COR_LETRA_TITULO);
painelTitulo.setBackground(ColorController.FUNDO_ESCURO);
iconeCarregamento.setForeground(ColorController.COR_LETRA);
}
代码示例来源:origin: stackoverflow.com
Canvas canvas = new Canvas();
canvas.setImage( someImageFile );
canvas.setSizeFromLoaded();
JScrollPane imagePane new JScrollPane( canvas );
imagePane.setBackground(new java.awt.Color(153, 153, 153));
imagePane.setBorder( null );
jSplitPane2.setRightComponent( imagePane );
代码示例来源:origin: org.cytoscape/table-import-impl
/**
* DOCUMENT ME!
*
* @param data
* DOCUMENT ME!
*/
public void setKeyAttributeList(Set data) {
keyPreviewScrollPane.setBackground(Color.white);
keyListModel.clear();
for (Object item : data) {
keyListModel.addElement(item);
}
keyPreviewList.repaint();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-xml-xam-ui
/** 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.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
scrollPane = new javax.swing.JScrollPane();
setLayout(new java.awt.BorderLayout());
setBackground(java.awt.Color.white);
scrollPane.setBackground(java.awt.Color.white);
scrollPane.setBorder(null);
scrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
add(scrollPane, java.awt.BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents
代码示例来源:origin: senbox-org/snap-desktop
private void createCellDefaultValueList(FocusListener focusListener) {
JList list = new JList();
list.addFocusListener(focusListener);
this.cellDefaultValueList = new JScrollPane(list);
this.cellDefaultValueList.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
this.cellDefaultValueList.setBorder(new EmptyBorder(0, 0, 0, 0));
this.cellDefaultValueList.setOpaque(true);
this.cellDefaultValueList.setVisible(false);
this.cellDefaultValueList.setBackground(Color.white);
this.cellDefaultValueList.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent event) {
cellDefaultValueList.getViewport().getView().requestFocusInWindow();
}
});
}
代码示例来源:origin: nl.cloudfarming.client/geometry-import
public ImportShapeSummaryPanel(){
this.setLayout(new MigLayout("wrap 1"));
JLabel summaryText = new JLabel(Bundle.ImportShapeSummaryPanel_summary_text());
this.add(summaryText);
tableModel = new DefaultTableModel();
importedtable = new JTable(tableModel);
importedtable.setBorder(new EmptyBorder(0,0,0,0));
importedtable.setBackground(Color.white);
JScrollPane importedTableScrolPane = new JScrollPane(importedtable);
importedTableScrolPane.setBackground(Color.white);
importedTableScrolPane.setBorder(new EmptyBorder(0, 0, 0, 0));
importedTableScrolPane.getViewport().setBackground(Color.white);
this.add(importedTableScrolPane);
}
代码示例来源:origin: Exslims/MercuryTrade
public JScrollPane getVerticalContainer(JPanel container) {
JScrollPane scrollPane = new JScrollPane(container);
scrollPane.setBorder(null);
scrollPane.setBackground(AppThemeColor.FRAME);
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.addMouseWheelListener(e -> MercuryStoreUI.scrollToEndSubject.onNext(false));
container.getParent().setBackground(AppThemeColor.TRANSPARENT);
JScrollBar vBar = scrollPane.getVerticalScrollBar();
vBar.setBackground(AppThemeColor.SLIDE_BG);
vBar.setUI(new MercuryScrollBarUI());
vBar.setPreferredSize(new Dimension(15, Integer.MAX_VALUE));
vBar.setUnitIncrement(3);
vBar.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
return scrollPane;
}
代码示例来源:origin: com.fifesoft/autocomplete
/**
* Called by the parent completion popup window the LookAndFeel is updated.
*/
public void updateUI() {
SwingUtilities.updateComponentTreeUI(this);
// Update editor pane for new font, bg, selection colors, etc.
TipUtil.tweakTipEditorPane(descArea);
scrollPane.setBackground(descArea.getBackground());
scrollPane.getViewport().setBackground(descArea.getBackground());
((JPanel)getContentPane()).setBorder(TipUtil.getToolTipBorder());
}
内容来源于网络,如有侵权,请联系作者删除!