No Left Padding?  My  label is too close to the border!

I am looking for a Swing equivalent to the CSS Left-Padding command for my bordered labels. GridBagConstraints.ipadx only increases the internal size of the label, but since I want the text left-justified, all the extra space is on the right.
I want to do something like this (the underline simulate the label border):
Label1__________
Label2__________
Label3__________
Label4__________
instead of this (which is ugly with a border on the left side):
Label1___________
Label2___________
Label3___________
Label4___________
Thanks!!

OK I found it...
You need to use an EmptyBorder (which supports insets) as an inside border of a compound border.
Here's an example, where I have a line border and 5px of left padding:
myLabel.setBorder(new javax.swing.border.CompoundBorder((new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.RAISED)),new javax.swing.border.EmptyBorder(new java.awt.Insets(0, 5, 0, 0))));
Of course, if you only want the padding and no border, you can use the EmptyBorder alone without the CompundBorder.
This technique works for all jComponents.

Similar Messages

  • Text field: First character too close to the margin

    Hi there,
    I created a form with entry fields. When the user fills in the fields, the first charcater is always too close to the left margin - so that for example it is difficult to distinguish a "3" from an "8" (see attachment).
    How can I change that?
    Thanks a lot
    HeikeK

    That's it, thanks a lot! I'd never found that on my own. I thought it was some property of the field, never thought of the paragraph format.
    Thanks again.
    Heike

  • In a Quiz the Correct Answer Buttons are too close to the answer letter. How to give more space?

    When creating a quiz and previewing, the Buttons to select the correct answer are too close to the letter for the answer. How do I add space between them. Suggestions?

    I think what you mean is that the quiz question's Failure action doesn't trigger until the final attempt and that would never happen if attempts is set to Infinite.  So if you were only incrementing the variable when the quiz question registered final failure then you'd only get one crack at incrementing the variable. yes.  My bad.
    However, if you are using Multiple Choice questions, you can also trigger actions using the Advanced Answer Option.  This will trigger an action when a particular answer is selected.  So if you set this for each incorrect answer, you could increment the variable each time they select the wrong answer.
    You can also use this same Advanced Answer action to execute a conditional action that first checks the value of the variable and then shows the rollover caption or increments the variable as needed.
    Say you create a variable called WrongAnswer and initialise it with a value of 0.  Then you create a Conditional Action called CheckWrongAnswer that looks like this:
    If WrongAnswer is equal to 1 assign Wrong Answer with 2, (then on the next line) Show RolloverCaption, ELSE assign Wrong Answer with 1.
    This shows the rollover caption after the second attempt resulting in an incorrect answer.

  • Incoming outdoor FIOS line/cable - needs remounting/hanging - too close to the lawn

    My incoming outdoor FIOS line/cable is very close to the backyard lawn - about 4 ft above the ground. It needs remounting/hanging. I just need Verizon to send someone to fix this problem but its Website is not user friendly to submit such a request. It asks me to go thru a series of unrelated self asked auto answered questions but still does not bring me to what I want. Is there a direct and quick way to file a service request?

    That is a GO-95 violation. All wiring must be 8 feet above ground. This is a PUC violation. Call Verizon back and ask to talk with the PUC rep within Verizon near your closest Business Office. Sounds like a contractor may have done it and not an actual Verizon Employee......

  • Too close to the exchange to get Infinity???

    Hi,
    I wonder if anyone can verfiy te following please?.  
    I live on the outskirts of Reading and have been told by a neighbour, who managed to speak to someone at BT, that in our road we are never likley to be able to get BT Infinity the reason being as follows:
    We are close to the Spencers Wood exchange and the lines to our road come directly from the exchange and not from a road side cabinet. In order to get Infinity the line must come from the cabinet and not the exchange.  Therefore although the exchange has been upgraded to be able to provide Infinity it is only possible to get this if you are supplied from a cabinet.  So, a number of houses round about us can get it, but we are unlikley to ever get it.
    Is anyone able to verify the accuracy of this please, and are there any other options available?
    Thank you.
    Solved!
    Go to Solution.

    BT Infinity runs off two kinds of VDSL types;
    FTTC - Fibre to the Cabinet. This is where there is a fibre line from the Exchange to the street cabinet then normal copper from there to the house/business.
    FTTP - Fibre to the Premises. This is where you have a fibre line all the way from the Exchange to the house/premises and doesn't route through a FTTC, aka RDSLAM.
    If your line is an EOL (Exchange Only Line) then you will have to wait for a FTTP Service to become available in your area.

  • Modify the title and the label of buton close of the help window popup

    Hello everybody.
    I am looking for a way to modify the title of window popup and the label of the close buton of the popup window help text.
    In my item template item, I am using the following in order to pop the window help :
    <a href="javascript:popupFieldHelp'#CURRENT_ITEM_ID#','&SESSION.')
    Thanks for any help.
    Lila

    Hi lila
    Let us say that you have page 1 on which you want to show help for some item....
    So in Post Element Text you can put an image tag ( for help) which onclick will call the function ...
    function helpWin()
    var URL = 'f?p=999:2:&SESSION::NO::';
    w = open(URL,1,"Scrollbars=0,resizable=0,width=600,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    so page 2 is your customisable help page...in which you can put page title ,customise button etc....
    hope it helps
    thanks
    -prashant

  • On the inbox screen on the right is the up down scroll, at the top there is rapid scroll which is too close to the Messaging box so when i select scroll up

    when on the inbox screen if i need to scroll up when i place the cursor on the rapid up > the messaging symbol is also highlighted so when i click on the > up the Messaging box opens.
    How can i move the > up symbol or the Messaging symbol ?

    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!

  • Stickies hard to close in Lion - resize arrows pop up as the close button is too close to the edge. Any ideas?

    Everytime I try to close a sticky note I can't manouvour the mouse over the close square as the mouse keeps changing to a resize arrow now they are standard on every side in Lion. Is it just me or is this a common problem?

    I have the same problem.  It will not close correctly.  I think a simple "Preferences" option in the menu that would allow for a doubling of the closing square size would fix the problem in future upgrades.  But then, how do you upgrade Stickies by itself?  I guess you need to wait for a system update.
    Kris

  • BT INFINITY - Too close to the exchange ?

    I am aware that only certainly cabinets will be "upgraded" for availability for BT Infinity. Needless to say that if you are directly fed from an Infinity enabled exchange (Not via a cabinet) then you will be unable to get BT infinity. Is there a possibility that your line could be re-routed through an Infinity Cabinet to enable you to take advantage of the Infinity download and upload speeds ? - or even better is there any solution on the horizon for people who are directly fed from the exchange to be able to have access to BT Infinity. It seems at the moment that potentially the closest customers to an exchange will be unable to get BT infinity ? - any help gratefully received.

    The closeness to the exchange has given you a better speed than most but your line is you line and cannot be changed.  could you imagine the chaos if you could decide where you wanted your line connected
    from reading similar comments on the forum their is no solution at present
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Text too close to page number in TOC

    Most of the time I can take care of unattractive line breaks in the TOC by putting in non-breaking spaces in a paragraph.
    However, I sometimes have a situation where the text of a TOC entry is too close to the page number on the right. The text is so close to the page number that in some cases no leader dots show, or only one or two leader dots show.
    The entry and its page number fit on a single line, so putting in non-breaking spaces won't solve the problem. I could put in a soft return (Shift-Enter) in the TOC entry to force a line break, but it isn't efficient because I have to put in the soft return manually each time the TOC is updated.
    If anyone has a tip on how to handle this problem efficiently, I'd love to know about it.

    Van
    That is absolutely brilliant. It also seems to prevent multi-line TOC entries from encroaching on the page number area in general.
    For ages I thought the only way around this ugly problem would be to wait 200 years for Adobe to give us four different indent options (first line left, left, right, and last line right) instead of the three that we currently have. (Last line right doesn't exist.)
    I'll just add one more suggestion that might make your line breaks and page number positions in the TOC 100% automatic instead of merely 98%.
    (It doesn't sound like much of an improvement, but if you've ever had to manually adjust the TOCs for 50 manuals every time you regenerated them, then you'll know where I'm coming from.)
    If you have any TOC paragraph specifications that use more than one tab, for handling section or chapter numbers at the front of the paragraph for example, then you'll notice that if a TOC entry wraps to two or more lines then the page number will no longer be printed at its intended tab stop, but will use one of the earlier tab stops instead (because in the new line there are no longer any previous tab characters to fill the earlier tab stops).
    The cure for this is to go to the TOC specification flow on the Reference pages, and in the problematic paragraph format add an extra tab character in front of the <$pagenum> building block.Then...
    If the TOC entry only covers one line, the extra tab character will be ignored.
    If the TOC entry covers two or more lines, the extra tab character will be used to fill up the previous stop so the page number settles at its intended tab stop.
    If you have TOC specifications that rely on more than two tab positions, just add more tab characters in front of the <$pagenum> building block (and regenerate) until the page number (in multi-line entries) lands at the correct tab stop.
    Thank goodness FM uses absolute tabs and not relative ones.

  • Magsafe too close to usb port

    my magsafe keeps sucking my usb key drives or adapters for SD cards. when i try to plug into the left port naturally, somtimes accidentally the usb port gets sucked by the magsafe port and the usb plug attaches to the magsafe port.
    not sure what the safety on that end is, but is it possible that now one of my SD cards don't work based on this accidental powerport magsafe connected briefly to my SD card adapter?
    i think either way, the ports are too close. sometimes the magsafe wants to connect to the usb port...i'm afraid one day it might just spark...thoughts?

    hi,
    i have the 15" macbook pro 2ghz.
    the problem is when i got to insert a usb drive or usb memory card adapter on the left hand side of the macbook pro, the usb tends to want to stick to the magnetic portion of the magsafe connector port, and hence gets "sucked" into the port.
    it's happened a couple time and i'm wondering on this last occasion that my memory card is not destroyed due to it's contact with the magsafe port.

  • Yet another iPhone 4 camera issue - flash positioned too close to camera!

    I have noticed photos taken with flash leave a bloom of white light on the left side of the photos. Seems to be the glare due to the fact the flash is positioned so close to the lens! There are no 'divider' between the 2.
    Usually on other phones, the lens and flash are hollow to minimise this effect, on the iPhone 4 both are on a flat surface and 2mm away from each other which exaggerate the problem even more!
    This problem seems to resemble similar issue with the N97.
    Why didn't Apple put the flash away from the lens to avoid this issue?
    Sample 1 without flash:
    http://venomrush.eu/apple/sample1_nonflash.jpg
    Sample 1 with flash:
    http://venomrush.eu/apple/sample1_withflash.jpg
    Sample 2 without flash:
    http://venomrush.eu/apple/sample2_nonflash.jpg
    Sample 2 with flash:
    http://venomrush.eu/apple/sample2_withflash.jpg
    Message was edited by: Venomrush

    I thought this was a problem when I first used my flash, but realized I had my finger too close to the flash and it was reflecting off of my finger.. Just make sure the light is not bouncing off of something in the environment that is close to the LED i.e. fingers..

  • Distance from wireless router too close??

    I have a WRT54GX4 and access from anywhere in my house or outside is not a problem....except when my laptop is on the same desk and about 18 inches away. I have a tough time acquiring a signal, and when I do, I usually lose it.
    Is there such a thing as being too close to the router? The only things nearby are my desktop monitor, a corded phone, desktop PC's speakers, printer, and a joystick.
    The problem is easily solved by using a cable, but I would prefer not if I could change something.
    Thanks in advance.

    - Change channel to 11... good frequency for wireless devices near each other.

  • Item Button Positioning: Too far to the right with "Begin on New Field"

    I'm attempting to add an item button inline with other items. If option "Begin on New Field" is set the button is too far to the right, however, if this option is unset the button is too close to the item on to its left.
    Any suggestions on how I can get more granular conrol of this button's location?
    Thanks in advance,
    Jeff

    Jeff,
    For situations like this I highly recommend the Firefox web developer toolbar. Since ApEx makes heavy use of tables for layout, using the "Outline >> Table Cells" feature shows you how things are broken up (with td tags) and offers clues to resolving problems.
    There is also a CSS viewer along with a "Display Element Information" option that shows a full hierarchical view of any element on that page that you want to click on. Check it out. You'll be glad you did.
    BTW, in your case, it appears that you simply have multiple elements of differing heights that are being vertically-aligned differently. The date picker icon appears to be bottom-aligned with it's associated text box while all the other elements appear to be centered on the row. Correcting it? Don't know. I'm sure Vikas or Carl could come up with a DOM/CSS hack that could make it look the way you want it.
    Earl

  • Mac login acounts too wide for the screen

    The older versions worked just fine, but Lion login account icons run left and right and are too wide for the screen on the macmini. So, I have to scroll to get to my account at the end of the list. Is there a way to change this?

    It is possible that the screen is too wide or too high and that the scroll bars fall off.<br />
    Open the system menu via Alt+Space and see if you can resize that window.<br />
    If that works then close Firefox to save that setting.<br />
    See also:
    * http://kb.mozillazine.org/Resizing_oversize_window
    Window sizes and positions are stored in [http://kb.mozillazine.org/localstore.rdf localstore.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder].
    See:
    * http://kb.mozillazine.org/Corrupt_localstore.rdf

Maybe you are looking for

  • My serial number for adobe photoshop elements 12 and premiere elements 12 does not work

    My serial number for adobe photoshop elements 12 and premiere elements 12 does not work.  On adobe.com it shows that the serial number I received is associated with adobe photoshop elements 9 and premiere elements 9.  I have purchased those products

  • BSP to trigger a Process Chain in BW

    Hi ,   I have a requirement to develop a BSP Application in the BW System where the BSP Application have to get some input parameter and in the back ground trigger a process chain. Can any one tell me how to trigger the process chain in BW System fro

  • Connecting 2 G5's Via Firewire

    Is it possible to connect to G5 towers via a Firewire 400 cable, and have the 2 Hard drives in G5 A show up on the desktop of G5 B? I remeber reading something a long time ago that said you could do it with the Laptops, but its been so long that I do

  • Moshi USB 3.0 to Gigabit Ethernet Adaptor

    I just bought a New Macbook Pro late 2014 , I saw the Moshi USB 3.0 to Gigabit Ethernet Adaptor , My internet speed is up to 195 Mbps . Is it good to buy it or the 2.0 where the deference is only $5.00 but forget about money wise sometimes i might us

  • SOLAR_EVAL--Reporting Functionalities

    Dear Team,   I am working in Sol Man 4.0 SP13. In RMMAIN transaction, i am updating the status as "Completed" & in the "Notices" , i am entering some text. In SOLAR_EVAL t.code, i am extracting the report for only "completed" status. In the report i