Questions tagged [jtabbedpane]

A Java Swing component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.

A Java Swing component that lets the user switch between a group of components by clicking on a tab with a given title and/or icon.

JTabbedPane may have tabs header along any of the four edges. Each tab header consists of the name and optional icon. Clicking on the tab header brings the associated tab to the top. The tab itself can any any single component (most often it is JPanel). Tab components are added to the tabbed pane like keys to the map:

tabbedPane.addTab("My tab", myComponent);

Duplicate tabs headers are possible but usually not used as they may be confusing. JTabbedPane also has methods to remove tabs and replace the tab header texts or icons.

For examples and information on using tabbed panes see How to Use Tabbed Panes.

824 questions
0
votes
1 answer

Height of tab (JTabbedPane) does not change

As the title says, the height of my tabs is not increasing as it should, my code looks like this: JTabbedPane jtp = new JTabbedPane(); JLabel iconInTab = new JLabel(new ImageIcon("myImage.png")); iconInTab.setPreferredSize(new…
Ordiel
  • 2,442
  • 3
  • 36
  • 52
0
votes
1 answer

Java dynamic tabs

I'm creating an app with JTabbedpane and I made a function that adds tabs with a click of a button. The tabs contain JTrees. After I add tabs I want to be able to add nodes to the trees in the tabs. Now, because tabs and trees are created…
Igor
  • 1,532
  • 4
  • 23
  • 44
0
votes
0 answers

JFreeChart's barChart

I have created a dataset (of type DefaultCategoryDataSet) for creating a bar chart (say barChart) with the JFreeChart api: ChartFactory.createBarChart(...). Then I created a ChartPanel - CP, and added the barChart to it. Finally I added the CP to…
user1639485
  • 808
  • 3
  • 14
  • 26
0
votes
3 answers

"Highlighting" specific rows in a JTable

I would like to highlight specific rows in a JTable whenever the contents of the a cell match with an input from the user. The following code is what I have that works thus far: JTable table = new JTable(model) { public Component…
David
  • 583
  • 1
  • 10
  • 27
0
votes
2 answers

TableModel not loaded with Data from JPA Query on MouseClick over JTabbedPane

I have a Java Class, i create a Query (JPA with EclipseLink) to Load Info from DB when a JTabbedPane is clicked, the data is loaded into the TableModel which is bound to a JTable. I use MouseClicked of MouseEvent, to get the selected tab. But some…
M.Hussaini
  • 135
  • 1
  • 5
  • 15
0
votes
1 answer

Using TextArea in TabbedPane

i have added a JTabbedPane with a JPanel in each tab. and a JText area within each JPanel. the tabs can be dynamically created in the same template. There is also a menu bar with a menu. it has options to replace an occurance of a string (eg replace…
0
votes
1 answer

Canvas3D Tabs Stop Rendering Correctly When Tab Removed from JTabbedPane

I'm working on a GUI that uses Java3D to display previews of 3d models. I have a JTabbedPane wherein each tab is a Canvas3D to allow loading multiple previews and switching between them. This has been working fine until I got around to adding in the…
user34212
  • 21
  • 1
0
votes
2 answers

Select JTabbedPane Panel with JMenuItem

I have a menu-bar and a tabbed pane in a frame, and i want that if i select a menuitem, then the requested tab will open. Please help me with this, thanks!!!
0
votes
3 answers

Java - Adding tab to JTabbedPane causing StackOverflowError (Disabling a firing ChangeEvent?)

Hey StackOverflow community, I'm having a StackOverflow problem. I'm having difficulty adding a new tab to my GUI's JTabbedPane container, when the [+] tab is selected. So far, whenever I click the [+] tab, new tabs are appended until a…
user1260503
0
votes
2 answers

Update JTabbedPane when new file added to directory

I have situation as follows: GUI with several tabs. Every tab shows content of files in the specific directory in my home directory. Some of these directories exist at the point of GUI creation and others do not. In one of tab via FTP I get some…
itro
  • 7,006
  • 27
  • 78
  • 121
0
votes
1 answer

DJ Native Swing JWebBrowser panel not working inside JTabbedPane

I am using DJ-Native-Swing - JWebBrowser for displaying a browser window in a tab of JTabbedPane which also include other tabs also. The code I am trying (on NetBeans 7.1.1) is: browserPanel = (JPanel) SimpleWebBrowserExample.createContent(); // I…
Asif
  • 4,980
  • 8
  • 38
  • 53
0
votes
2 answers

JTabbedPane spacing

Original Top tab orientation setting: http://dl.dropbox.com/u/3238736/screenshots/Screenshot-PasswordStore-1.png Problematic Right tab orientation setting: From the GUI above, my JTabbedPane (the blue colour tab on the right) is overlapping the…
thotheolh
  • 7,040
  • 7
  • 33
  • 49
0
votes
0 answers

Nested JPanel in a JScrollPane goes into infinite flickering/repaint loop

I have a Swing app with a middlin complex set of nested layouts. (Multiple splitpanes and scrolpanes) One of the Jpanels in a ScrollPane in a SplitPane contains a list of Jpanels with various controls in them. Every now and then when I resize the…
CasaDelGato
  • 603
  • 7
  • 17
0
votes
1 answer

JTabbedPane perform action above and below

I want to put JTabbedPane in the middle,and clicking any tab I want to change will reflect in both above and below panel of tabbedpane. I tried it but it works only on the below panel. How to overcome from this problem? Please help me. Thanks in…
Aritra
  • 163
  • 4
  • 18
0
votes
2 answers

How to Verify Tab Names in JTabbedPane

I am using a JideTabbedPane. which extends JTabbedPane. After a user edits the name of a tab, I want to check whether the name meets certain criteria, e.g. the name must not be an empty string. If it doesn't meet the criteria, the old name of the…
BJ Dela Cruz
  • 5,194
  • 13
  • 51
  • 84