How do I Position Tabs Top-Right, Bottom-Right, etc??
I've spent countless hours looking over the net and here trying to find anything that shows how to position tabs within a JTabbedPane (or a deriviative of it) in OTHER than top-left, left-top, right-top or bottom-left.
My most immediate need is to put the tabs top-right, and I was able to modify the layout to do that, but that screwed up all other positions. When I hacked up the paint method to changed the rects, it worked until the tabs lost focus.
Digging really deep into an extension of JTabbedPane, TabbedPaneUI, and the inner TabbedPaneLayout, I kept running into dead-ends in one place or the other, like, finding private methods, or different mechanisms for getting the tabplacement.
If anyone has any pointers, please let me know. At the moment, I'm so exasperated that I'm actually writing my own custom tabbed pane. However, my tabbed pane will allow ANY component as a tab and allow 12 anchors for the tabs, but I'd still just like to get the tabs top right.
Java Joe Morgan
You're friggin' kiddn' me! OK.. that makes me feel really stupid... but I generally think of component orientation as an internationalization thing and it simply never dawned on me to try!
I'll get a big laugh out of this some day... somewhat like you are right now!
Thanks... you've saved me about only a zillion lines of code.
Things to note for those finding this answer:
1) For left and right tab runs, this doesn't have an effect, but why would it? Yet, it might have been nice to have a right-bottom or left-bottom.
2) For top and bottom tab locations, if you want the tab order the same left to right order as you add them, you have to add the tab components in reverse order. That is, in your code you add Tab1, Tab2, Tab3, and set component orientation right to left, your tabs will be, left to right, Tab3, Tab2, Tab1. So to get tabs positioned on the right (top or bottom) and left to right order Tab1, Tab2, Tab3, you'll need to add them Tab3, Tab2, Tab1.
Edited by: Java-Joe-Morgan on Dec 17, 2009 2:31 PM
Similar Messages
-
CS3: Rotated page item: How can I get the top-right point
Hi
I have a rotated page item. Now I should have the top-right and the bottom left point. If I get the rectangle of this page item I only have the top-left and the bottom-right point. And I can read the rotation angle.
- How can I get the missing points?
Thanks
HansAlgorithmically speaking (ie, this is NOT real code), isn't it just something like:
if page.rotationAngle == 90 then
origTopLeft = (newBottomRight.Y, newTopLeft.X);
else if page.rotationAngle == -90 then
origTopLeft = (newTopLeft.Y, newBottomRight.X);
else if page.rotationAngle == 180 then
origTopLeft = newBottomRight;
else
origTopLeft = newTopLeft; -
How to auto scroll from top to bottom on JTable ?
HI All.
At the current, I use JTable is contained JScrollPane. Now, I want Jtable auto scroll from first item to bottom and when JTable scroll to bottom then Jtable will scroll bottom to top, It is loop. Who know how do this function, please help me.Thanks for reply
Actually. I was code -> scroll from top to bottom on JTable. Code below But when JTable auto scroll then screen is not smooth.
Please help How to workground for this problem
private void scrollTopToBottom() {
try {
JViewport viewport = flexGrid.getViewport();
int heightViewport = viewport.getViewSize().height;
while(moveY < heightViewport) {
synchronized (this) {
while (suspended)
this.wait();
if (stopped)
break;
moveY += 10;
if(moveY > heightViewport) {
moveY = heightViewport;
viewport.setViewPosition(new Point(0, moveY));
try {
Thread.sleep(500);
} catch (InterruptedException e1) {
e1.printStackTrace();
viewport.updateUI();
} catch (InterruptedException e) {
} -
How can I print the top and bottom halves of 11x17 PDF on 8.5x11?
I have a multi-page 11x17 PDF of quiz cards designed to be printed double-sided so that a question appears on one side and the answer on the other side. (Page 1 has the questions; page 2 has the answers.) My printer is 8.5x11 so I would like to print the top half of 11x17 page 1 onto 8.5x11 page 1 and the bottom half of 11x17 page 1 onto 8.5x11 page 2. Then I will flip the 8.5x11 pages over and repeat the process, this time printing 11x17 page 2.
Is there a way to print the top and bottom halves of an 11x17 PDF onto two 8.5x11 pages?
Thanks!The easiest solution I know of requires you to have a copy of Adobe InDesign. You can easily layout PDFs within InDesign in the configuration you want and create a new PDF.
I don't know any way to print it directly in that layout, unfortunately. -
Cp6 - effects (how to fade in from top to bottom?)
Hello all,
I am attempting to simulate an effect I often used in Lectora. I used this effect on text bullets where the text would slowly appear (fade in) one line at a time from top to bottom.
Is there a similar effect in Captivate 6. I gave up looking for it.
Also, has anyone bothered to catalog and demonstrate all the effects available in Captivate 6? If not, perhaps I will take on this project next month.... seems worthwhile.
Thank you,
ShawnThank you for your response Lieve.
Lilybiri wrote:
Please: http://lilybiri.posterous.com/list-with-effects-in-captivate-555-thank s-col
They didn't change in CP6
You have to make each line a separate Text container (caption or smart shape) and apply the effect on each line, stagger them on the timeline
Lilybiri
The list is great...
I suspected that was the only way. That is far too much work for all the bullets that I would like to animate. I'll have to do without.
But I appreciate your post. -
''Duplicate post, continue here - [https://support.mozilla.com/en-US/questions/780590]''
I want move Firefox tabs to the bottom like opera
but the code of userChome.css
#content > tabbox { -moz-box-direction: reverse; }
does'nt work,
and tabmix can do this,but current version of tabmix is incompatible with Firefox 4.You can get the development version of Tab Mix Plus which works with Firefox 4 from http://tmp.garyr.net/forum/viewtopic.php?t=10888
The author of Tab Mix Plus has stated that he is almost ready to release a new version of Tab Mix Plus. -
On Win7 this HELP works. But on Win XP there is no Firefox button. Instead there is the menu bar. In TOOLS|OPTIONS there is no checkbox for "Tabs on top".
Is there some way to move the tab bar back down where it belongs in Firefox on WinXP?
Thanks,
TedOn WinXP the Firefox button isn't shown by default. It appears when you hide the Menu Bar.
Right-click the Menu Bar and click on Tabs on Top, so the check-mark is gone for that menu item.
Or, you can open '''View''' > Toolbars and un-check Tabs on Top. -
How To Create Gradient Horizontally, Top to Bottom
Within Illustrator CS4, I created a rectangle.
Is it possible to fill the rectangle using a gradient with the gradient occurring from the top of the rectangle towards the bottom edge, essentially having long strips of color from left to right within the rectangle?
It appears that the gradient tool fills in the rectangle using vertical bars, and I would like to have long horizontal strips.
Is there some way to rotate the fill so the gradient happens in the other direction?look in your gradient panel - window -> gradient
That middle field with the 0 in it is the angle of your gradient. you want 90˚ or -90˚ -
How to create the tabs at the bottom of window?
Some sites have tabs or text areas that stay attached to the bottom of the browser window. Like here (may take about 20 seconds to appear or you may have to make the window smaller) http://www.cgchannel.com/
Can someone point me to a method of doing this? Thanks. -DerrylDo you mean something like this sticky footer?
http://alt-web.com/DEMOS/CSS2-Sticky-Footer.shtml -
How to make new tab open right next to the original one and not at the end?
I use things like Focus Last Tab and Open Relative add-ons for FF to get this behavior, how can it be done in Safari.
sorry for the 3 posts but they were different questions wanted to keep them separate.
Safari 4.0bump
-
JEditorPnae setCaretPosition ? how to place position on top of page
Hi,
i am new to here ,
sorry if i violate anything.. anything.
we are making a multimedia cd with swing.
we show content in a JEditorPane . we paste a html document with paragraphs with known id"s
15,16,17,18... for example:
i want to place the caret( or make visible a paragraph)
Element text=doc.getElement(String.valueOf(paragraphId));
aJEditorPane.setCaretPosition(text.getStartOffset());
but this shows the paragraph at the end of visible area. But i want this to be seen at begining of page...
is it clear or i have talked so much? i do not known. Think u are searchinfg with
ctrl + F
when u hit enter resuly seems at bottom.
ok. thanks for helps..You need to scroll the viewport to the top of the scroll pane. You would do something like:
Rectangle r = textComponent.modelToView( text.getStartOffset() );
textComponent.scrollRectToVisible( r ); -
Adding image in top right corner of video
Hi all,
I am a FCE newb. I would like to import a logo in .jpg format and have it positioned throughout my movie in the top right corner.
I imported the image and managed to make it smaller. However I have not figured out how to place in the top right corner, nor how to make it appear on top of the video.
Any help would be really appreciated.
ThanksHi
I would do like this
Build the Loggo in PhotoShop on a new Layer (not background layer)
and make it so that parts that should be transparent are so
Save as a photoshop file .psd
Import this into FCE/P and put it on TimeLine
Now it will take two video-tracks eg v2 and v3
on v2 You got the background - delet this
on v3 You got Your loggo - altering transparence will make it even better
I use this method when I need a map and an animated arrow. This I make in multi layer
then when imported I only turn on and off transparacy to the videotracks to make
it grow bit by bit.
Yours Bengt W -
Centering flash movie top and bottom in dreamweaver?
Hi all, I'm a novice user of dreamweaver.
I've placed a flash movie in dreamweaver and centered it left
and right but how can I center it top and bottom so it
floats?Not too sure what you mean exactly by "so it floats." But
I'll hazard a
guess that you want your video to appear inside a
semi-transparent lightbox
that appears to float over the page content beneath it. If
so, have a look
at FloatBox.
http://randomous.com/tools/floatbox/
Nancy O.
Alt-Web Design & Publishing
www.alt-web.com
www.twitter.com/altweb
www.alt-web.blogspot.com/ -
Why does the content spill over and how do I position this under the menu and title?
I was following this tutorial on how to add a scrolling image gallery to a Flash website.
(http://www.republicofcode.com/tutorials/flash/xmlimagegallery/index.php)
From what I understand from this tutorial, it is just a matter of copying the Actionscript code and pasting it onto the timelines then making modifications on the XML.
(kindly see a screenshot of timeline layers I made and as to where I put the Actionscript code:
http://i429.photobucket.com/albums/qq19/tsujzpie/imagegalleryproblem_01.jpg )
I pasted the code onto the blank keyframe labeled "Gallery"...
But all I get is this weird effect when I click on the button for the gallery...
(kindly see a screenshot of it here: http://i429.photobucket.com/albums/qq19/tsujzpie/imagegalleryproblem_02.jpg )
When you put a blank keyframe on a timeline, any content put in there is supposed to only be contained in that very frame, right? How come then that - whenever the gallery button is clicked on - the content from that section spills out onto the other sections even when I click on other button for the other areas?
I just really couldn't think why this is happening - any reason why this is so?
And how do I position the gallery right under the section header and menu bar?
Here is its AS2 code, by the way:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var myGalleryXML = new XML();
myGalleryXML.ignoreWhite = true;
myGalleryXML.load("gallery.xml");
myGalleryXML.onLoad = function() {
_root.gallery_x = myGalleryXML.firstChild.attributes.gallery_x;
_root.gallery_y = myGalleryXML.firstChild.attributes.gallery_y;
_root.gallery_width = myGalleryXML.firstChild.attributes.gallery_width;
_root.gallery_height = myGalleryXML.firstChild.attributes.gallery_height;
_root.myImages = myGalleryXML.firstChild.childNodes;
_root.myImagesTotal = myImages.length;
_root.thumb_height = myGalleryXML.firstChild.attributes.thumb_height;
_root.thumb_width = myGalleryXML.firstChild.attributes.thumb_width;
_root.full_x = myGalleryXML.firstChild.attributes.full_x;
_root.full_y = myGalleryXML.firstChild.attributes.full_y;
callThumbs();
createMask();
scrolling();
function callThumbs() {
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;
var clipLoader = new MovieClipLoader();
var preloader = new Object();
clipLoader.addListener(preloader);
for (i=0; i<myImagesTotal; i++) {
thumbURL = myImages[i].attributes.thumb_url;
myThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
myThumb_mc._y = _root.thumb_height*i;
clipLoader.loadClip("thumbs/"+thumbURL,myThumb_mc);
preloader.onLoadStart = function(target) {
target.createTextField("my_txt",target.getNextHighestDepth (),0,0,100,20);
target.my_txt.selectable = false;
preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
preloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.removeTextField();
target.onRelease = function() {
callFullImage(this._name);
target.onRollOver = function() {
this._alpha = 50;
target.onRollOut = function() {
this._alpha = 100;
function callFullImage(myNumber) {
myURL = myImages[myNumber].attributes.full_url;
myTitle = myImages[myNumber].attributes.title;
_root.createEmptyMovieClip("fullImage_mc",_root.getNextHighestDepth());
fullImage_mc._x = _root.full_x;
fullImage_mc._y = _root.full_y;
var fullClipLoader = new MovieClipLoader();
var fullPreloader = new Object();
fullClipLoader.addListener(fullPreloader);
fullPreloader.onLoadStart = function(target) {
target.createTextField("my_txt",fullImage_mc.getNextHighestDepth (),0,0,200,20);
target.my_txt.selectable = false;
fullPreloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
target.my_txt.text = Math.floor((loadedBytes/totalBytes)*100);
fullPreloader.onLoadComplete = function(target) {
new Tween(target, "_alpha", Strong.easeOut, 0, 100, .5, true);
target.my_txt.text = myTitle;
fullClipLoader.loadClip("full_images/"+myURL,fullImage_mc);
function createMask() {
_root.createEmptyMovieClip("mask_mc",_root.getNextHighestDepth());
mask_mc._x = _root.gallery_x;
mask_mc._y = _root.gallery_y;
mask_mc.beginFill(0x000000,100);
mask_mc.lineTo(_root.gallery_width,0);
mask_mc.lineTo(_root.gallery_width,_root.gallery_height);
mask_mc.lineTo(0,_root.gallery_height);
mask_mc.lineTo(0,0);
container_mc.setMask(mask_mc);
function scrolling() {
_root.onEnterFrame = function() {
container_mc._y += Math.cos(((mask_mc._ymouse)/mask_mc._height) *Math.PI)*15;
if (container_mc._y>mask_mc._y) {
container_mc._y = mask_mc._y;
if (container_mc._y<(mask_mc._y-(container_mc._height-mask_mc. _height))) {
container_mc._y = mask_mc._y-(container_mc._height- mask_mc._height);You should create a manually movieclip symbol with nothing in it and take a copy of it from the library and place it in the frame where you intend for the gallery to display. Give it an instance name of "container_mc" and remove the following line from your callThumbs function
_root.createEmptyMovieClip("container_mc",_root.getNextHigh estDepth());
You probably need to do the same for the mask and the full images since they appear to also be created using dynamic mc's. -
How to make tabs appear on top right corner in JTabbedPane
Hi,
the JTabbedPane class provides options to add the tabs on top, left, right and bottom. and on top, the tabs appear only on the left side.
but i want the tabs to appear on the right top side..
is it possible and if yes, how..
any ideas!!!
cheers and regards
Deepak sainiHello Beat,
thanks for your answer. But maybe I described it wrong. I have the logo still on my PDF-Document. I just want to have it on the top right corner and not, like it is now, on the left side of the paper. So the only question is how to move the logo to the top right corner?
Kind regards
Boris
Maybe you are looking for
-
Query re creating a new due date schedule
Hi We are looking to create a new suite of 'free-choice' courses whereby students can choose their own selection of modules at the start of each of three semesters and pay for them, in total, at that time. As the fee will be based around the course,
-
"cannot install this hardware" usb data cable
Then it continues to say because cannot find the neccessary software for installion. I have nokia 6230i which i just got back from nokia after they fixed the battery problem and slow menus (i presume they just updated the firmware?) My cable says ma-
-
Batch extract file resolution from image xmp file
Hi all,<br />I am looking for a batch process that extracts the X & Y pixel dimensions for a bunch of TIFF files.<br />I find the data in the XMP file when I save out the file:<br /><rdf:Description rdf:about=''<br /> xmlns:tiff='http://ns.adobe.com
-
Web Tools Upgrade From v625 To SP1 Difficulties
I'm trying to upgrade a website from v625 to SP1. I complete the instructions according to page 14 of the Administrator's Guide, and complete the plugin installation. However, after trying to upgrade the website via the installer, I get the following
-
iam from india i have purchased iphone 3gs for seconds and i restored it, after restore completion i got a problem of no sim installed .... iam worried plz help me what to do