本文整理汇总了Java中javax.swing.JTabbedPane.setBounds方法的典型用法代码示例。如果您正苦于以下问题:Java JTabbedPane.setBounds方法的具体用法?Java JTabbedPane.setBounds怎么用?Java JTabbedPane.setBounds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JTabbedPane
的用法示例。
在下文中一共展示了JTabbedPane.setBounds方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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);
}