javax.swing.JTabbedPane
Hello, I’m pretty new to JMonkeyEngine and I want to make a TabbedPane for a chat-like section with Channels added dinamicaly (when you want to).
The trouble is when the Tab Layout Policy is Scroll instead of Wrap
[java]myTabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT) [/java]
You can’t change between tabs with the mouse.
That was weird because it does every event and action implemented.
I would like to add the natural behavior of that listener (change selected tab), because I could change between tabs selecting the name on the list of “Friends”.
I tried using
· JMeDesktop
- Adding InnerFrame with the components*
- Adding swing.JDesktop with the InnerFrame and that frame with the components*
- Adding JPanel with the components*
*The components are the Tabbed Pane, Textboxes and Buttons for the chat appareance.
I thought it was because of listeners troubles on components adding from a public class that extends container used, so I turned it into a private class and also creating the tab inside a method of the main class, but they didn’t work.
Then I noticed that it worked when I’m not using the Scroll Layout Policy.
The control works correctly in a JFrame.
Maybe I need to add the natural behavior explicit. But it works with the Wrap Layout Policy.
Also the font (color and type) is ignored when I add it to the JMEDesktop
This is the test with the innerFrame:
This is why I don’t want this Tab Layout Policy:
Greetings!