JComboBox - Bias With White Space

Is there a simple way to bias an editable JComboBox with a single space so that the text isn't pushed up against the left side of the box?
This is a solution but only works on uneditable JComboBoxes due to using a Renderer and not an Editor.
http://forum.java.sun.com/thread.jspa?forumID=257&threadID=558935

Thank you for the help. Is there a way to do this without overwriting the border of the JTextfield? Setting the border to EmptyBorder overrides the default Swing border for the JComboBox.
I tried this line of code.
((JTextField)comboBox.getEditor().getEditorComponent()).setMargin(new Insets(0,5,0,0));Unfortunately the margin of the JTextField is ignored.

Similar Messages

  • Firefox 3 cannot download files with white space in the filename

    When opening attachments in e-mail Firefox is unable to handle files with white space in the name. This is not the same as the white space file name truncation problem documented on this site (where file names with white space are truncated on saving.) The issue is that the browser will prompt to allow the file to be saved, but it will not prompt to open the file as an option. If I rename the file to remove white space then I do receive the "Open with..." dialog box. I verified that Firefox 2 did not have this problem and I can open attachments with white space in the file names just fine using that version of the browser (2.0.0.20).
    == This happened ==
    Every time Firefox opened
    == Upgraded to version 3

    When a user clicks on an attachment with spaces, the filename is truncated to the first whitespace. While IE, Chrome & Safari handle this, Firefox refuses to accept mime headers with unquoted filename parameters. According to Firefox's bugzilla/knowledgebase, Firefox's behavior is the correct behavior and it's a problem with most webservers or web applications. This problem can be easily corrected by surrounding the filename parameter with double quotes.
    Eg.
    Response.AddHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");

  • JDK 1.6 Installation INSTALLDIR with white space

    Hi,
    I am trying to install jdk 1.6 in silent mode. I am using following command:
    <jdk1.6>.exe /s INSTALLDIR="C:\Program Files\CA\IAM\JDK1.6"
    But this shows me the usage dialog. When I remove INSTALLDIR then it gets installed in Program Files\Java. When I use a INSTALLDIR path that does not contain any white space then also it gets installed successfully. What could be the problem with the white space in "Program Files"?
    Thanks,
    Rajeev

    Ah, I found it. For anyone interested the answer can be found in a bug report addressing this very issue:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4966488

  • Remove XML Tags with White space.

    Hi All, I have a scenario like the below code where I have empty spaces in few columns of my tables. I create XML of the data and send it. There is a lot of code such and I can't add ISNULL() on each and every column. Is there any simple one line code working
    with the XML so that I can remove the tags with only empty spaces. TIA.
    DECLARE @xml1 VARCHAR(max)
    DECLARE @xml2 VARCHAR(max)
    set @xml1 = (SELECT 1 AS Col11, ' ' AS Col21, 'ABC' AS Col31 FOR XML RAW, ELEMENTS)
    set @xml2 = (SELECT 2 AS Col12, ' ' AS Col22, 'ABC' AS Col32 FOR XML RAW, ELEMENTS)
    DECLARE @xml xml;
    SET @xml = Cast('<ROOT>' + ISNULL(@xml1, '') + ISNULL(@xml2, '') + '</ROOT>' as xml)
    SET @xml.modify('delete //*[not(node())]');
    -- Some Way to Remove the XML Tags with Empty space here.
    select @xml as XMLString
    /* Output of the Above script.
    <ROOT>
    <row>
    <Col11>1</Col11>
    <Col21> </Col21> -- This XML Tag with a white space should be removed
    <Col31>ABC</Col31>
    </row>
    <row>
    <Col12>2</Col12>
    <Col22> </Col22> -- This XML Tag with a white space should be removed
    <Col32>ABC</Col32>
    </row>
    </ROOT>
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

    It would have helped if there had been a trim() function in XQuery.
    With some trial and error and inventive thinking I came up with this:
    <span style="color:Blue">SET</span> @xml.modify(<span style="color:#A31515">'delete //*[. <= " "]'</span>);
    As they say: it seems to work. But I leave no warranties.
    Erland Sommarskog, SQL Server MVP, [email protected]
    Wow Erland  this
    seems to work, I need to test it against my data and update on this. Thanks again.
    Welcome to MSDN Forums.
    Feel free to ask your questions and Please Note to Vote all helpful topics and
    Mark all answering posts.
    You Value Community's efforts and Community values your faith.
    - Arun Kumar Allu

  • Replacing Selected Areas with White Space

    I am using Acrobat version 8 on an XP Pro SP2 system.
    I have a PDF file. Certain selected areas I wish to replace with pure white space. How can I do that?

    You will find other ways which SEEM to remove blank material but avoid
    them like the plague since it is very easy to get back the hidden
    material. Redaction needs specialist tools. There is a plug-in, Redax
    from http://www.appligent.com/
    Aandi Inston

  • Problema with white space at the bottom

    http://formypets.net/cat_training.html
    I keep getting that strange white space at the bottom and I
    have no idea what to do. Can someone give me a hand, please?

    labecs wrote:
    > I was just hoping to get a recommendation about where I
    can go to have someone
    > check my code and fix it where it needs fixing. I
    haven't been able to get an
    > opinion about the site, which is my first and I am just
    learning, and i don't
    > know if there 's something I'm doing really wrong or
    right or whatever. Anybody?
    >
    Hi,
    Try a new post asking for a site check or a site critique -
    you'll no
    doubt get differing advice about best practises on the
    construction -
    take what you get objectively, most will be constructive,
    don't be
    disheartened and don;t forget it's your client who is the
    person you
    most have to please.
    I think it looks great and for a first site - quite
    incredible really -
    you seem to have a fairly good grasp on what's going on with
    the code
    and (you may get crit for using absolute positioning) you
    also seem to
    have a grasp on relative and absolute positioning.
    One wee thing I see (sorry don't have time to trouble shoot
    for you) is
    a slight layout difference between IE and FF - possibly a
    double margin
    bug - a bigger gap between the centre and the right columns!
    Oh - and you might want to consolidate your css - shift the
    embedded
    styles to your linked sheet.
    HTH
    chin chin
    Sinclair

  • Need help with white spaces/halos when creating PNG

    I'm using Illustrator CS6 on Windows 7. I'm trying to create some pushpins that will go on an online map. I've created the graphic in Illustrator and everything looks nice and sharp. My problem is when I try to convert this .ai file to png. The ai file is set up on 8.5 x 11 artboard with the graphic taking up the whole artboard; the final size of the png needs to be 20x34 pixels at 72 dpi.
    I've tried both Save for Web and Export but no matter what I do, when I open the png in Photoshop, there is a white space between the grey pushpin and the black stroke as well as around the outside of the S. No matter what I've tried, I can't get rid of these unwanted white spaces/halos. Is there a setting I'm missing somewhere? The large image below is how it looks in Illustrator; the small image is the png opened in Photoshop. How can I get the small png to be as crisp as the large ai file? Thanks.

    mc-mark,
    Are you sure the artwork is contained within whole pixels on the Artboard?
    One way to obtain that is to move the artwork so that the Transform panel tells you that the X and Y values of the lower left corner (or centre or something else) are whole pixels/points; another way is to tick Align to Pixel grid  in the Transform panel, but I am afraid that may distort the artwork when used at this stage.

  • Replace period with white space

    I am trying to replace a period in a string with a white space. It does not want to work with a period but works just fine with a comma!
    Please can somebody tell me what I am doing wrong.
    This is the code that I am using:
    System.out.println("Unicode:" + "\u002E");
    CharSequence inputStr = "12.345,67";
    String patternStr = "\u002E";
    String replacementStr = " ";
    //Compile regular expression
    Pattern pattern = Pattern.compile(patternStr);
    //Replace all occurrences of pattern in input
    Matcher matcher = pattern.matcher(inputStr);
    String output = matcher.replaceAll(replacementStr);
    System.out.println("output:" + output);

    As mentioned "." is considered differently in regular expressions. You can change the patterStr to "[.]" and your code will work.
    Since you have used replaceAll() I guess as the size of inputStr varies many thousand seperator can occur. Even then the fix mentioned by me will work
    Thanks
    Arun

  • Query return/wddx with white space

    i have a query return i am looking at which i will send it to
    another program but for some reason this is coming with some white
    space. i have following questions.
    if i make changes on the admin console for white space
    management do i need to reboot.
    i am trying to use cfsetting but it is still producing some
    white spaces at the beginging. when i see the source.

    The CF admin setting helps but does not completely solve
    whitespace issues. (Look at the source for these forum pages, for
    example..)
    Also, beware of people who tell you to strip the whitespace
    off after the fact by manipulating CF output as though it were a
    string.
    Put this at the top of your Application.cfm or
    Application.cfc:
    <CFSETTING EnableCFOutputOnly = "yes">
    This means that nothing makes it to the page unless it is
    inside <CFOUTPUT> tags or in WriteOutput ().
    This is good practice anyway because it encourages you to
    separate output code from logic and makes you more conscious of
    whitespace as you code.
    Finally, for XML to some programs or the <DOCTTYPE>
    declaration to IE know that the output must be immediately after
    the first <CFOUTPUT> with no whitespace of any type.
    IE:
    <CFOUTPUT><?xml version="1.0" encoding="UTF-8"?>
    works but
    <CFOUTPUT>
    <?xml version="1.0" encoding="UTF-8"?>
    doesn't.

  • Ant 1.6.5 VSS path properties with white space?

    Could any one please help me with this problem?
    I want to use Ant to check out the files from a VSS database by using the Ant vssget task.
    The configuration manager uses path names i VSS with a lot of white space like this:
    vss.project.path=$/Service Deliveries/B. Projects/RKMS/15_Source_Code/MLISRKMS149 - UNIX Daemon Control
    I get a error return code from vssget task when I try go fetch the files.
    How can I solve the problem. I am not allowed to rename any thing in VSS. My vssget task looks like this:
    <target name="vss-get-files" depends="check-properties"
    description="Check the package files out from VSS to the local disk">
              <vssget localPath="${basedir}"
    recursive="true"
    login="${vss.user},${vss.password}"
    ssdir="${vss.ss.path}"
    serverPath="${vss.server.path}"
    vsspath="${vss.project.path}"
    failonerror="true"
    writable="false"
    autoresponse="Y"/>
    </target>
    -- Flemming

    Weblogic 9.x supports only JDK 1.5 ? Now, Iam trying to perform same build using Weblogic 8.1 SP5 and Iam not able to find javax.jms.ConnectionFactory in weblogic.jar, where as in Weblogic 9.x 'weblogic.jar' javax.jms.ConnectionFactory' is found.
    code snippet:
    String url = "t3://" + hostName + ":" + hostPort;
    Environment environment = new Environment();
    environment.setProviderUrl( url );
    environment.setInitialContextFactory( weblogic.jndi.WLInitialContextFactory );
    Context context = environment.getInitialContext();
    ConnectionFactory factory = (ConnectionFactory)context.lookup( "..." );
    Connection theConnection = factory.createConnection();
    Iam using SUN JDK 1.4.2.11 ( even did try Weblogic JDK). I have weblogic.jar and JDK/tools.jar included in my classpath.
    What other jar files we need to included in my classpath to make this code to work in weblogic 8.1SP5 ?

  • [SOLVED] Download from a SourceForge URL with white spaces

    I was trying to make a PKGBUILD for The Butterfly Effect, a free game which is still in it's Milestone 7 version. The thing is I'm not able to use this URL to download the source:
    "http://download.sourceforge.net/sourceforge/tbe/files/Milestone 7/TheButterflyEffect-M7.src.tgz"
    That is probably because the white space, and it must be SourceForge's fault, since neither wget (the one used with PKGBUILDs) nor Konqueror can download from that location, which I think is correct (I use others that way for other PKGBUILDs).
    So...
    1) Am I wrong, and I should write the URL with another syntax, or
    2) is there a trick for cases like this one?
    Last edited by Gallaecio (2010-06-19 16:35:28)

    I don't know what's the matter with your software, but the correct link to the file is
    http://sunet.dl.sourceforge.net/project/tbe/Milestone%207/TheButterflyEffect-M7.src.tgz
    A space in a weblink usually translates into %20. See this for more info: http://en.wikipedia.org/wiki/Percent-encoding

  • Problem with white space

    Hi,
    I do an insert in a table. I try to insert a white space in a varchar2(1) field. I use parameter query.
    But when i try to do this, odp.net insert a NULL value instead of the white space.
    Is there a parameter to change to avoid this problem ??
    Thanks in advance.

    Not sure if this is exactly the issue but
    you could try the current Patch 4147997
    ODP.NET Patchset 9.2.0.4.15
    or try a Workaround of binding parameters as Char which does not remove trailing spaces:
    cmd.Parameters.Add(new OracleParameter("data",
    OracleDbType.Char,10)).Value=" ";
    or
    cmd.Parameters.Add("data",
    OracleDbType.Char,10," ",
    System.Data.ParameterDirection.Input);

  • XMl empty node is coming with white space.

    HI Experts,
    In the incoming file my xml element value is 
    <element /> 
    but after reading through code am getting it as 
    <element> </element>
    how can i avoid this issue.

    Whitespace is not significant in XML, so you can trim it away. Once you get the string value of the element, you can call Trim() to remove any trailing whitespace. You can then check the result to see if it is indeed empty:
    var trimmedValue = elementValue.Trim();
    if(string.IsNullOrEmpty(trimmedValue) == true)
    // value is empty
    else
    // value is not empty

  • In rc.conf, how to specify a parameter with a white space in it?

    I'm setting up the wireless network. In rc.conf:
    wlan_wlan0="wlan0 essid myessid key mykey"
    myessid in my case is something like "ABC DE", I've tried many ways, but it seems all archlinux is doing is to simply split that string with white space characters as deliminaters.
    Can any one tell me how to write the correct script in my case? Thank you.

    I think this is not possible.
    /etc/rc.d/network
    wi_up()
    eval iwcfg="\$wlan_${1}"
    [ "$iwcfg" = "" ] && return 0
    /usr/sbin/iwconfig $iwcfg
    iwcfg is used unquoted and thus subject to field splitting. The standard doesn't seem to provide any way to switch it off from inside the string being splitted.
    Last edited by diegonc (2010-07-09 21:25:16)

  • Report Painter Report - Leading White Spaces in Cost Element

    When calling up a report painter report, e.g. S_ALR_87013613, with cost element characteristic in Office integration/Microsoft Excel as output parameters, the cost element (row item) is indented with white spaces.  The number of white spaces seems to be in relation with summation levels (sub-totals) visible in the left panel.  For some cost centres that only have limited transactions, such as no posting to salary account group, there are less levels of summation, meaning less leading white space in cost elements.  Is there any way to eliminate or have a fixed number of leading white spaces in cost elements? 
    We export the report to Excel worksheet for further processing.  VLOOKUP function is used to read the cost element into another workbook.  The inconsistent number of leading white spaces creates a problem for the formulas to work properly. 
    Any suggestion is appreciated.
    Regards,

    Hello,
    There are different ways of downloading the report to excel. One option is
    System ==> List ==> save (to local file)
    Please try with other options.
    If still not working, then the work around would be
    You can put ctrl+H (replace all spaces)
    Then text to columns
    Hope this works.
    Regards,
    Ravi

Maybe you are looking for

  • Error in BW Report

    Experts,    I am executing BW report in Bex ,When i execute After entering in the parameters ,it is giving Application error messages  . Error an exception with typeCX_SY_DYN_CALL_ILLEGAL_TYPE Occured ,                                                

  • Export problem & audio garbled if using "Fade in" effect

    Hi everyone, I'm using iMovie HD 6, and I'm not sure why this is happening. I have a 30-second clip that I added credits to over the first few seconds. I then go to export (Share>Quicktime) and it creates an mp4 file, but when I try to open it I get

  • Integer Division by Zero Error

    I'm getting the above error about 5 minutes into encoding with FME 1.01.460. Any ideas?

  • Help, how do i delete DNSchanger?

    Yesterday while i was using google to find something i came upon their warning saying that my computer might be infected, it looked like this: i followed the instructions it gave me to get rid of this malware called "DNSchanger", went to the page htt

  • Buying an iMac - what to do with my 5 year old powerPC G5?

    Hey, Of late - my extremely reliable powerPC G5 has been acting up. Being, I think, 5 years old - I didn't want to press my luck so I have ordered a 24"iMac. (I don't need all the box I once did)... However - the G5 probably still has some use. I jus