Spacing between textfield and text

Anyone know how to set spacing between the text and border of a textfield?
The docs say to use
textfield.setMargin(new Insets(top, left, bottom, right));
but that doesn't do anything.
Thanks a lot for suggestions.

The problem is that your border isn't going to use the margin of the text field (since it's not specialised for text fields). You've got a number of options:
1) use the default border
2) use a compound border with the default border inside
3) write your own border that incorporates the text field's margin
4) don't bother setting the margin and simply add a corresponding EmptyBorder into your compound border instead
Option 4 is probably the quickest for you:
textField.setBorder(new CompoundBorder(SOLID_BORDER, new EmptyBorder(10, 10, 10, 10)));Hope this helps.

Similar Messages

  • How to increase the width size between PROMPT and TEXT BOX?

    Hi Gurus,
    my page having MessageTextInputs. Normally page runs displays the Prompt name and one text box will displayed.
    my requirement is
    1) how to increase the width size between PROMPT and TEXT BOX?
    2)prompt name displays like
    elephant
    xxxxxant
    xxxxRose
    here xxxxx indicates SPACE
    but my client requirement is don't displays the SPACES in left side.
    so our requirement is in page PROMPT displays like
    elephant
    ant
    rose
    How to achieve this plz help me
    its very urgent
    Thanks

    Hi,
    Create a table layout region and under that use 'messageStyledText' for displaying the prompt and use 'messageTextInput' for text field without giving any prompt to that.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                           

  • IN smartfprms what is the difference between Tempalete and Text?

    IN smartfprms what is the difference between Tempalete and Text?

    hi
      i think should ask diff. b/w Tempalete and Table , Text is defined to write Out on SF weather it is static or Table data.
          u have to define Text Element in both (Tempalete n Table)
    and diffrence b/w Table n Tempalete is well define by above  answer.
    reward points if useful.

  • Need help with space between bullet and text in list

    I've been trying to increase the space between my bullet and text in my list. Everytime I increase the margin-left or padding everything moves to the right but the space between the bullet and text stays the same. Would someone help me figure out what I'm doing wrong. Website is located here. http://www.webassistantsllc.com/clients/sport
    Thanks
    Lynne

    Thanks for the help. That worked perfectly.
    Another question on my bullet:
    Is there a way to adjust the position of my bullet in a list? http://www.webassistantsllc.com/clients/sport
    Thanks
    Lynne

  • How do you change the spacing between lines of text?

    using Dreamweaver 6 how do you change the spcing between lines of text. Not seeing it as a option in the page properties menu.

    Try CSS line-height property.
    Kenneth Kawamoto
    [link removed by moderator]

  • Translation - Reduce spacing between label and value

    Hi all,
    I have translated the text in multi languages. I am not able to adjust the gap between Text and input field.
    For example:
    Now displaying :
    1. Lang   'EN' ->  Customer : SAP         
    2. Lang   'FR'  ->  Client:        SAP 
    3. Lang   'DE' ->   kunde        SAP
    I need to  display as:
    1. Lang   'EN' ->  Customer : SAP         
    2. Lang   'FR'  ->  Client: SAP 
    3. Lang   'DE' ->   kunde: SAP
    Concatenate could not be done as i have to display field label in bold.
    So I want to reduce the gap between Field label and its content. Above example for english the gap is less but for other langauges gap or spacing is more. How to reduce the spacing?

    Hi Harryibm ,
    If you are simply outputting this information from data bound to the form the you may be able to use a floating field instead of a field and caption. You can just use a text element and then go to Insert->Floating Field while editing the text. You can then bind the floating field to the data connection as usual and the length of the text will vary depending on the content at runtime.
    Let me know if this helps.
    Ben.

  • Help with adjusting spacing between thumbnails and image in slideshow

    How can I adjust the spacing on the slideshow page?
    Customer wants more space between the thumbnails at the top and the image(s). Can I move the image & navigation tool or adjust the image size relative to the thumbnails and navigation tool at the bottom?
    Although I'm familiar with html source code and working on simple stuff at that level, I have yet to locate it in iWeb and make any adjustments.
    If anyone has step-wise instructions, I'd appreciate it. Thanks much.

    Although I'm familiar with html source code and working on simple stuff at that level, I have yet to locate it in iWeb and make any adjustments.
    iweb photos page's elements: header controls, detail view and footer controls are generated by ajax widgets, so there is nothing to in page source for you to find.
    If anyone has step-wise instructions, I'd appreciate it. Thanks much.
    that would be the instruction on how ajax widgets build photos page... there is none.
    you can send feedback to apple and ask for details on iweb widgets and tools to build widgets.
    that said, it can be done... check out with safari: http://temp.cyclosaurus.com/DetailView_Rearranged/Photos.html
    code is linked to my example, i don't do tutorial.

  • Creating a space between image and text

    www.bristolequestrianservices.co.uk
    On my index page I have created another social media buttons on my page on my right side.  Don't want to confuse people but the #social-media-icons2 are on my right side as I wanted to change the margins. 
    I want a gap between my h2 tag "view gallery" and then the photo and a gap after the photo and follow us...  Thanks Karen
    css
    #social-media-icons
    {  float:right; }
    #social-media-icons ul li
    {display:inline; }
    #social-media-icons ul
    {margin-top:40px; }
    #social-media-icons2
    {  float:left; }
    #social-media-icons2 ul li
    {display:inline; }
    #social-media-icons2 ul
    {margin-top:10px; }
    <div id="rightside">
                      <h2>Latest News</h2>
                <p><a href="newpictures.html">New Pictures Added</a></p>
                <p><a href="testimonials.html">New Testimonials</a></p>
                <h2>View Gallery</h2><br>           
                <img src="images/photos/1a.jpg" /><br>          
                <h2>Follow Us</h2><br>
           <div id="social-media-icons2">
                      <ul>
                          <li><a href="https://www.facebook.com/groups/150449201771804/"><img src="images/icons/facebook.jpg" /></a></li>
                  <li><a href="£"><img src="images/icons/rss.jpg" /></a></li>
                  <li><a href="http://www.twitter.com"><img src="images/icons/twitter.jpg" /></a></li>
                  <li><img src="images/icons/youtube.jpg" /></li>
                </ul>
                        </div>

    The H2 tag is absorbing a rule applied to many elements on line 10 of styles.css (margin:0;padding:0;).
    Being the H2 tag is used in so many contexts you probably don't want to add a concrete padding rule for all H2's. You might want to add a generic utility class to it, e.g.:
    h2.padBottom10 {
       padding-bottom: 10px; /* change to desired amount */
    The "Follow Us" tag is a good example of this because it would have absorbed that bottom padding if you didn't use a class for it. It also should have a generic class applied to it so other H2's are not affected, same as above but a different utility class:
    h2.padTop10 {
         padding-top: 10px;
    As always with CSS there's a million ways to do it but on specialized items like this, if it only appears in one place or has a smaller purpose, applying a general utility class can be useful.
    Then you'd just add the class to the H2, e.g.  <h2 class="padBottom10">View Gallery</h2>, <h2 class="padTop10">Follow Us</h2>.

  • HT2523 What is the difference between Pages and Text Edit? Pros and Cons?

    I just purchased a Macbook Pro, and I am currently exploring its features. I see that it comes with Text Edit, which seems to be its form of Microsoft Word...but I also know that you can purchase "Pages" for the computer. What is the difference? Pros and cons of each? I will be a freshman in college in the fall, so I need something that I can do lots of writing and editing on.

    TextEdit is a simple basic text editor. Far from what MS Word can do. This is Pages:
    http://www.apple.com/iwork/pages/

  • JEditorPane: transforming between caret position in html and text/plain

    Hi all,
    I've done quite a bit of searching, and found problems similar to this one, but not this exactly, so I'll try asking it here.
    I have a JEditorPane with HTMLEditorKit, which I'm using for a WYSIWYG text editor. When the user wants to insert something, say an image, I get the caret position and insert a String into the document's underlying text.
    The problem is that if we are the WYSIWYG mode, the caret position isn't the same as the caret position in text/plaain mode.
    So if the underlying text is
    <html>
      <body>
         Some text
      </body>
    </html>the user will just see "Some text". If they place the caret between "Some" and "text", editorPane.getSelectionStart() will return '5'. But I want to insert my text at position '16' in the plain text.
    Is there a simple way to go back and forth between these two positions? Or to have getSelectionStart() to return the index relative to the text/plain mode?
    Thanks!
    Tim

    Very poor that no one answered this one.
    Did you still need the answer?
    I have 'a' answer. But not a complete one.
    In fact I only found this in search for an answer for my problem:
    http://forums.sun.com/thread.jspa?threadID=5409216&tstart=0
    Did you actually just test out what you knew so far to test what happens?
    If you were to use the HTMLEditorKit.insertHTML function, it just wants the visual caret position. So '5' would have been reasonably correct for you.
    I was doing something like this:
                   HTML.Tag tag = null;
                   Pattern p = Pattern.compile("\\s*\\<\\s*(\\w+).*", Pattern.MULTILINE|Pattern.DOTALL);
                   Matcher m = p.matcher(text);
                   if (m.matches())
                        tag = HTML.getTag(m.group(1));
                   kit.insertHTML(doc, offset,// +1
                                  text, 0,// 0
                                  0,// 0
                                  tag);
    Assuming you were inserting a tag, my code there checks what tag it is, and if that is known by the java implementation, assigns that to 'tag', so that the element is correctly inserted.
    If it is not known, we just use 'null'. Which for me wasn't such a great result.
    In fact, nothing really was a great result, as with the default java implementation being buggy (so far as I can see) it inserted to the wrong position and caused all sorts of anomalies.
    Hope you worked it out. And if you did, and have a better result than what I have, maybe you can let me know what you did!
    Sincerely,
    sean

  • Phtmlb: space between Label and Field

    Hello,
    I am using <phtmlb:matrix> to arrange the fields next to one another on the view. For fields, <phtmlb:formLayoutInputField> is used in which case the label is taken automatically through binding to DDIC fields. At one particular row of matrix, it is required to break-up the cell in 3 more cells, so that I can display 3 fields adjacent to one another in the space of one cell. For this I am nesting one more matrix inside the outer matrix.
    Something like this...
    <phtmlb:matrix>
    <phtmlb:matrixCell row = "1"
    col = "1" />
    <phtmlb:formLayout>
    <phtmlb:formLayoutInputField>
    </phtmlb:formLayout>
    <phtmlb:matrixCell row = "2"
    col = "1" />
    <phtmlb:matrix>
    <phtmlb:formLayout>
    ...3 fields next to one another / 3 cells
    </phtmlb:formLayout>
    </phtmlb:matrix>
    </phtmlb:matrix>
    I am able to acheive the desired output of 3 fields next to one another, but facing the following problem.
    To get the inner matrix(3 fields) into effect, i need to close the <phtmlb:formLayout>.
    Now, the first row properly shows all the filds one below the other with proper spacing between the label and input output field.
    (Actually all the input_output fileds are placed at a distance of largest text/label in one formlayout).
    But when the second row starts, the spacing between label and field is no longer taken as per the first row in above case.
    Is it because since a new <phtmlb:fomlayout> is started , the spacing will be as per the elements in this new formlyout. If yes, How can I assure the same spacing between elements of two different formlayouts. I tried "fieldToLabelFactor" but since no. of fields in my page is too large, I can't afford to decide this factor for every <phtmlb:formLayout>.
    Or is there any better way to acheive the required output.
    Thanks ,
    Priti

    did u get the solution?

  • Using a sum formula with a data and text row?

    In 9.3.1 Financial reporting.
    One row is retrieving values from essbase connection and is a data row
    the second row is a fixed amount (390K) and was entered as a text row.
    The third row is the formula row that sums up row 1 and row 2
    However the total shows only the value of the data row (row 1)
    I read the doc and it doesn't say you cannot do a formula between data and text rows but it doesn't see to work. Anyone get by this without having to create a dimension to dump a fixed number in to report off of?
    JTS

    You are right on.. A text row by definition and functionality is to be considered as a text, and not as a number [Even though the text can be number based].
    Did you try something like this?
    sum(row[41],390)
    As you referred, you can always add a member in essbase DB
    Cheers
    RS

  • Display key and text by WAD command in custom structure hierarchy

    Hi everybody,
    I have a query using a custom structure with hierarchy layout. As usual the structure does only display its text as descriptions but I can enable the display the key in BEx Web by right-click on the analysis item --> Properties --> Characteristic --> Display. Unfortunately these setting can not be defined directly in the structure within the Query Designer.
    For a workaround I put the query into a web template, in which I used the Set Presentation (SET_PRESENTATION) command to enable key and text display from the start. Hence I put that command in the wem template parameters Action Before First Rendering (ACTION_BEFORE_FIRST_RENDERING). Everything is working properly and makes me very happy.
    But... there is one thing missing, I would like to implement... I want a toggle button, which allows the user to switch between key and text display and text display. Unfortunately setting the same command from Action Before First Rendering (ACTION_BEFORE_FIRST_RENDERING on a various button does not working. The button command only affects data rows of the leaves of the structure hierarchy. All parent nodes do not change their appearance.
    Any ideas how to solve this?
    Thank you for any helps and comments!
    Sebastian

    Hi Sebastian,
    I have a similar problem. Can you help me? How did you set the entry in Member Presentation of Command SET_PRESENTATION to display key and text? I just found the values to set the only text or only key.
    best regards,
    Barbara

  • Cannot copy/paste between X11 and Aqua after 10.5.7 update

    I'm stumped. After updating to 10.5.7 I am unable to cut/paste between xterm and Text Editor or any other Aqua-based app (email, browser, etc...). I can cut/paste between Aqua apps. And I can cut/paste between X11 apps, but X11 <-> Aqua just does not work. Commands pbpaste and pbcopy work great and are a temp fix, but I cannot work this way much longer. Going back to Linux is looking more and more attractive.
    Thanks.

    Put the image on a server and use the html code
    Create another user account and see if X11 behaves normally in the new account. If it does, you know the problem must then reside in your own configuration settings.

  • Controlling the space between label and Input field in SELECT-OPTION

    Hi ,
    I am using WDR_SELECT_OPTIONS as a used component in order to dynamically generate the Select option in my WD Component.
    Can any one tell me if there is a way to control the spacing between Label and Input field?  This is because rest of the UI elements are in one particular order but for this dynamically generated UI.
    Please help me.
    Thanks,
    Kavitha

    Hi Kavitha,
    The label is required for accessibility reasons. It's not possible to remove it and to use your own label from outside the component to point to it. Labels cannot point to targets across views (and hence acress component) boundaries.
    Best regards,
    Thomas

Maybe you are looking for

  • Rented TMNT 2014 no longer available

    Hello, Friday night (Oct 24th) I rented the new Teenage Mutant Ninja Turtles (2014 - Michael Bay) movie. 3/4 of the way through, the movie stopped playing. I blamed my Internet (line of sight) and figured I would finish the movie later this weekend.

  • Premiere CC 2014 - Magic Mouse issues?

    I know most professionals might prefer not using Apple's Magic Mouse for professional applications, but I happen to kind-of like the mouse. However, since using the latest version of Premiere CC 2014, I've noticed some very erratic behavior with the

  • Help with hard wired express

    Be gentle, I am struggling here! I have an airport extreme in a location that does not allow my airport express to connect wirelessly in a consistent fashion. I recently hardwired the express by pulling cat5 to my remote location. I have the cat5 plu

  • Re: Satellite L650D LAN not working after Win7 reinstallation

    Hello friends i have a big problem with my notebook I just reinstalled the windows 7 home premium and now i cant access to internet There is an unknown device in my device manager I have downloaded many drivers but non is working for LAN. Waiting for

  • Invalid timestamp in logs

    Hi I've found this in server logs: 005-02-21 11:22:16 CET HPServer Warning Log Management The date field is probably invalid on D:\BEA\XX\XXServer\XXServer.log00238 line 518. Message ignored during search while: BEA-170014 Warning: The date field is