I ve made a JtabbedPane with layout Wrap_tab_layout. TO simplify
things lets say i have 10 tabs, 5 are in one row, and the remaining 5
are in the second row. What i d like to do, is when i choose one of
the tabs that are in the second row, i want to flip the two rows
together, so i can get the second row now first (which is the one that
includes the tab i chose) and the first row, second.
You can see this in Netbeans. You have the same effect that i want to
make when creating your gui in the gui section, but this dosesnt stay
when you compile & run it.
Does anyone know how to do this? I appreciate any help.
Thanx in advance,
Stacey
I think that is L&F specific, isn't it?
Karsten if you read this, can you shed some light here?
> Thanx in advance,
>
Btw. why is that functionality important to you? One way (and I don't like that
way) would be to remove the tabs from second row and insert it before the first
row, reselecting previously selected tab. (But again I don't quite like that
solution, better let the L&F handle that for you)
> Stacey
>
Stefan
Oh, so L&F is charge of this? i didnt know.
Thank you very much for the instant reply.
Stacey
On Dec 2, 6:41 pm, Stefan Rybacki <noem...@noemail.foobar> wrote:
>
> I think that is L&F specific, isn't it?
> Karsten if you read this, can you shed some light here?
>
>
[Context: Swapping the row with the selected tab to be in front.]
> This is my thesis, and i was told to do it. :S
Too bad. Is it a central part of your thesis or just something
incidental to the program you are writing as part of it?
If this were from someone I was advising, I would be pleased if they
would present arguments for why this was a bad idea. But I realize that
not all supervisors are that reasonable.
I think that this is a bad idea, because it makes what I feel is a
unneeded and indeed unhelpful change in the layout of the window.
Having the tab rows move around means that users can't learn, for
example, that a particular tab is in the middle of the top row. Because
sometimes it's there, and sometimes it's in the bottom row instead. And
that placement may be determined by a choice completely unrelated to the
tab in question.
So it seems this particular design element will reduce the efficiency of
the interface, reduce the benefits of learning to work with the software
and generally move things around on the screen to the annoyance and
possible frustration of users. OK, it's probably not quite that bad,
but I don't see what BENEFIT you get from moving the rows of tabs. And
I see a bunch of disadvantages.
--
Thomas A. Russ, USC/Information Sciences Institute
Still if someone knows how to do it, i would appreciate it if he gave
me some guidelines.
Thank you again.
Regards,
Stacey
On Dec 3, 12:22 am, t...@sevak.isi.edu (Thomas A. Russ) wrote:
I think the problem is that you might be able to solve this by implementing your
own tabbed pane ui but the problem is that you can't solve it for any other L&F
provided UI.
If you don't mind then try starting to write your own ui for tabbed pane
starting with:
BasicTabbedPaneUI
especially have a look at
getTabBounds
But again I have to agree with Thomas, that this seems to be a ridiculous
requirement from your supervisor.
Thomas & Stefan are on target. IIRC, this approach to tabbed panes
appeared in the MS Word 6 preferences window. It was not well-received.
Is it possible that your advisor intends for you to investigate this
aspect of UI programming? If so, you might look at a few existing Look &
Feel implementations to see how they vary:
<http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html>
--
John B. Matthews
trashgod at gmail dot com
http://home.roadrunner.com/~jbmatthews/
Thanx again,
Best regards,
Stacey
On Dec 4, 5:29 pm, "John B. Matthews" <nos...@nospam.com> wrote:
> In article <4937ac7...@news.uni-rostock.de>,