当前位置: 首页>>代码示例>>Java>>正文


Java JTabbedPane.setBackground方法代码示例

本文整理汇总了Java中javax.swing.JTabbedPane.setBackground方法的典型用法代码示例。如果您正苦于以下问题:Java JTabbedPane.setBackground方法的具体用法?Java JTabbedPane.setBackground怎么用?Java JTabbedPane.setBackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JTabbedPane的用法示例。


在下文中一共展示了JTabbedPane.setBackground方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
/**
 * Initialize the contents of the frame.
 */
private void initialize() {
    frame = new JFrame("Library Book Loan System - My Books and Reservations");
    frame.setResizable(false);
    frame.setBounds(100, 100, 700, 400);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().setLayout(null);
    
    JLabel label = new JLabel("Library Book Loan System");
    label.setHorizontalAlignment(SwingConstants.CENTER);
    label.setFont(new Font("Segoe UI Light", Font.PLAIN, 18));
    label.setBounds(10, 11, 674, 30);
    frame.getContentPane().add(label);
    
    JLabel lblBookReservations = new JLabel("My Books and Reservations");
    lblBookReservations.setHorizontalAlignment(SwingConstants.CENTER);
    lblBookReservations.setFont(new Font("Segoe UI Light", Font.PLAIN, 14));
    lblBookReservations.setBounds(10, 42, 674, 22);
    frame.getContentPane().add(lblBookReservations);
        
    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setBackground(SystemColor.text);
    tabbedPane.setBounds(10, 75, 674, 228);
    frame.getContentPane().add(tabbedPane);
    
    initializeCurrentBooks(tabbedPane);
    initializeWaitlist(tabbedPane);
    initializeHistory(tabbedPane);
    
    frame.setVisible(true);
}
 
开发者ID:hisener,项目名称:bbm487s2017g1,代码行数:34,代码来源:CustomerMyBooksAndReservationsWindow.java

示例2: initOutputPane

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initOutputPane()
{
    JTabbedPane output = new JTabbedPane(JTabbedPane.BOTTOM);
    JConsole console = new JConsole();

    console.setBackground(Color.WHITE);
    _model = new DemoModel(console);
    _console = new JConsole();

    output.addTab("Console", _console);
    output.setBackground(Color.WHITE);
    output.setPreferredSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
    output.addTab("Interpreter", console);
    try
    {

        //
        _helpTextArea.setText(_model.help());
    }
    catch (IOException x)
    {
        exceptionThrown(x);
    }

    //
    _container.add(output);
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:28,代码来源:Demo.java

示例3: initialize

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
/**
 * Initialize the contents of the frame.
 */
private void initialize(String username) {

    frame = new JFrame("Library Book Loan System - Librarian: " + username);
    frame.setResizable(false);
    frame.setBounds(100, 100, 586, 418);
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    
    JPanel panel = new JPanel();
    frame.getContentPane().add(panel, BorderLayout.CENTER);
    panel.setLayout(null);
    
    JLabel label = new JLabel("Library Book Loan System");
    label.setHorizontalAlignment(SwingConstants.CENTER);
    label.setFont(new Font("Segoe UI Light", Font.PLAIN, 18));
    label.setBounds(10, 11, 564, 25);
    panel.add(label);
    
    JLabel lblBookOperations = new JLabel("Book Operations");
    lblBookOperations.setHorizontalAlignment(SwingConstants.CENTER);
    lblBookOperations.setFont(new Font("Segoe UI Light", Font.PLAIN, 14));
    lblBookOperations.setBounds(10, 40, 564, 22);
    panel.add(lblBookOperations);
    
    JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    tabbedPane.setBackground(Color.LIGHT_GRAY);
    tabbedPane.setBounds(10, 73, 564, 295);
    panel.add(tabbedPane);


    initCreateTab(tabbedPane);
    initUpdateTab(tabbedPane);
    initDeleteTab(tabbedPane);
    initViewTab(tabbedPane);
}
 
开发者ID:hisener,项目名称:bbm487s2017g1,代码行数:38,代码来源:LibrarianBookOperations.java


注:本文中的javax.swing.JTabbedPane.setBackground方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。