摘要: There are two ways to set a tool tip on a tab. The first is to specify it when the tab is created; the second way is to set it using JTabbedPane.setTo 阅读全文
posted @ 2018-09-06 09:18 borter 阅读(158) 评论(0) 推荐(0) 编辑
摘要: A toolbar can be either horizontal or vertical. When the orientation is horizontal, the objects in the toolbar are displayed left-to-right. When the o 阅读全文
posted @ 2018-09-06 09:18 borter 阅读(144) 评论(0) 推荐(0) 编辑
摘要: // Create a tabbed pane JTabbedPane pane = new JTabbedPane(); // Set the text color for all tabs pane.setForeground(Color.YELLOW); // Set the background color for all tabs ... 阅读全文
posted @ 2018-09-06 09:17 borter 阅读(278) 评论(0) 推荐(0) 编辑
摘要: The tabs of a tabbed pane can be placed on one of the four edges of its container. By default, when a tabbed pane is created, the tabs are placed on t 阅读全文
posted @ 2018-09-06 09:17 borter 阅读(231) 评论(0) 推荐(0) 编辑
摘要: // To create a tabbed pane, see e828 创建JTabbedPane // Remove the last tab pane.remove(pane.getTabCount()-1); // Remove the tab with the specified child component pane.remove... 阅读全文
posted @ 2018-09-06 09:16 borter 阅读(170) 评论(0) 推荐(0) 编辑
摘要: // To create a tabbed pane, see e828 创建JTabbedPane // Get the index of the currently selected tab int selIndex = pane.getSelectedIndex(); // Select the last tab selIndex = p... 阅读全文
posted @ 2018-09-06 09:16 borter 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Setting a mnemonic on a tab allows the tab to be selected with a keystroke. For example, if the mnemonic for a tab were the key L, then typing ALT-L ( 阅读全文
posted @ 2018-09-06 09:15 borter 阅读(108) 评论(0) 推荐(0) 编辑
摘要: By default, all the tabs in a tabbed pane are displayed. When the tabs are wider than the width of the tabbed pane, they are displayed in rows. If spa 阅读全文
posted @ 2018-09-06 09:15 borter 阅读(133) 评论(0) 推荐(0) 编辑
摘要: To move a tab, it must first be removed and then reinserted into the tabbed pane as a new tab. Unfortunately, since there is no object that represents 阅读全文
posted @ 2018-09-06 09:15 borter 阅读(150) 评论(0) 推荐(0) 编辑
摘要: A tabbed pane fires a change event whenever the selected tab is changed either by the user or programmatically. 阅读全文
posted @ 2018-09-06 09:14 borter 阅读(153) 评论(0) 推荐(0) 编辑
摘要: This example retrieves all the tabs in a tabbed pane: Most of the methods that allow the properties of a tab to be changed require the index of the ta 阅读全文
posted @ 2018-09-06 09:14 borter 阅读(189) 评论(0) 推荐(0) 编辑
摘要: This example demonstrates various ways to add a tab to a tabbed pane. 阅读全文
posted @ 2018-09-06 09:13 borter 阅读(111) 评论(0) 推荐(0) 编辑
摘要: By default, all new tabs are enabled, which means the user can select them. A tab can be disabled to prevent the user from selecting it. 阅读全文
posted @ 2018-09-06 09:13 borter 阅读(160) 评论(0) 推荐(0) 编辑
摘要: The weight of a split pane controls the behavior of the divider when the split pane is resized. If the weight is 0, all extra space is given to the ri 阅读全文
posted @ 2018-09-06 09:12 borter 阅读(181) 评论(0) 推荐(0) 编辑
摘要: A tabbed pane is a container that displays only one child component at a time. Typically, the children are themselves containers of other components. 阅读全文
posted @ 2018-09-06 09:12 borter 阅读(141) 评论(0) 推荐(0) 编辑
摘要: // Create a left-right split pane JSplitPane hpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftComponent, rightComponent); // Create a top-bottom split pane JSplitPane vpane = ... 阅读全文
posted @ 2018-09-06 09:11 borter 阅读(137) 评论(0) 推荐(0) 编辑
摘要: A split pane divides its space between two components. The split pane contains a divider that allows the user to control the amount of space distribut 阅读全文
posted @ 2018-09-06 09:11 borter 阅读(131) 评论(0) 推荐(0) 编辑
摘要: The location of a divider is measured in pixels from either the left edge (in the case of a horizontal split pane) or the top edge (in the case of a v 阅读全文
posted @ 2018-09-06 09:10 borter 阅读(119) 评论(0) 推荐(0) 编辑
摘要: A divider can be no less than one pixel in size. 阅读全文
posted @ 2018-09-06 09:10 borter 阅读(258) 评论(0) 推荐(0) 编辑
摘要: // Create a number spinner JSpinner spinner = new JSpinner(); // Get the text field JFormattedTextField tf = ((JSpinner.DefaultEditor)spinner.getEditor()).getTextField(); ... 阅读全文
posted @ 2018-09-06 09:09 borter 阅读(111) 评论(0) 推荐(0) 编辑