How to set the margin of a jtextfield when using standard lineborder

Hi,
I want to give my jtextfield a custom inset. The problem is that I also use a lineborder which controls the inset, thus when I try to the setMargin method, it doesn't work.
Can anyone tell me how to do this?
Much thanks
Hugo Hendriks

hello,
try to use a compoundborder and add the lineborder and an emptyborder to it. by setting the emptyborders insets you can control the jtextpanes insets.
i hope that one works =)
bye

Similar Messages

  • [svn:fx-trunk] 10545: Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts

    Revision: 10545
    Author:   [email protected]
    Date:     2009-09-23 13:33:21 -0700 (Wed, 23 Sep 2009)
    Log Message:
    Make DataGrid smarter about when and how to calculate the modulefactory for its renderers when using embedded fonts
    QE Notes: 2 Mustella tests fail:
    components/DataGrid/DataGrid_HaloSkin/Properties/datagrid_properties_columns_halo datagrid_properties_columns_increase0to1_halo
    components/DataGrid/DataGrid_SparkSkin/Properties/datagrid_properties_columns datagrid_properties_columns_increase0to1
    These fixes get us to measure the embedded fonts correctly when going from 0 columns to a set of columns so rowHeight will be different (and better) in those scenarios
    Doc Notes: None
    Bugs: SDK-15241
    Reviewer: Darrell
    API Change: No
    Is noteworthy for integration: No
    tests: checkintests mustella/browser/DataGrid
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-15241
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase .as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColu mn.as

    Hi Matthias,
    Sorry, if this reply seems like a products plug (which it is), but this is really how we solve this software engineering challenge at JKI...
    At JKI, we create VI Packages (which are basically installers for LabVIEW instrument drivers and toolkits) of our reusable code (using the package building capabilities of VIPM Professional).  We keep a VI Package Configuration file (that includes a copy of the actual packages) in each of our project folders (and check it into source code control just as we do for all our project files).  We also use VIPM Enterprise to distribute new VI Packages over the network.
    Also, as others have mentioned, we use the JKI TortoiseSVN Tool to make it easy to use TortoiseSVN directly from LabVIEW.
    Please feel free to contact JKI if you have any specific questions about these products.
    Thanks,
    -Jim 

  • How to set the value of process variables/payload using a managed bean?

    Hello,
    Someone can give me an example about how to set the values of a process payload in a managed bean?
    thank you!

    Try this:
    jsf page:
    <af:selectOneChoice label="Select Suburb"
    requiredMessageDetail="Select a suburb"
    valueChangeListener="#{selectOneChoiceBean.onValueChanged}"
    validator="#{selectOneChoiceBean.validate}"
    unselectedLabel="None" autoSubmit="true"
    binding="#{selectOneChoiceBean.selectOneChoice}"
    value="#{selectOneChoiceBean.value}">
    <f:selectItems value="#{selectOneChoiceBean.selectionList}"/>
    </af:selectOneChoice>
    backing bean:
    public class SelectChoiceBean {
    private List<SelectItem> selectionList;
    private String value = "B";
    private RichSelectOneChoice selectOneChoice;
    public SelectChoiceBean() {
    initSelectionList();
    public void setSelectionList(List<SelectItem> selectionList) {
    this.selectionList = selectionList;
    public List<SelectItem> getSelectionList() {
    return selectionList;
    public void onValueChanged(ValueChangeEvent valueChangeEvent) {
    System.out.println(valueChangeEvent.getNewValue());
    // Add event code here...
    public void validate(FacesContext facesContext, UIComponent uIComponent,
    Object object) {
    // Add event code here...
    private void initSelectionList() {
    selectionList = new ArrayList<SelectItem>();
    selectionList.add(new SelectItem("A", "A label"));
    selectionList.add(new SelectItem("B", "B label"));
    selectionList.add(new SelectItem("C", "C label"));
    public void setValue(String value) {
    this.value = value;
    public String getValue() {
    return value;
    public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
    this.selectOneChoice = selectOneChoice;
    public RichSelectOneChoice getSelectOneChoice() {
    return selectOneChoice;
    }

  • How to set the text in a jtextfield to align to the left

    A quick simple question. I'm populating a jtextfield with text pulled from a record. However the text is too long to fit in the jtextfield and the alignment is set to the right rather than the left. How do I set the alignment of the text in the jtextfield to be on the left, so that the first character of the string is shown?
    I've tried using
    setHorizontalAlignmnet(JTextField.LEFT),
    but my text still appears right justified in the jtextfield. It means that the user has to scroll the text to go to the beginning of the string, rather than the usual of scrolling the right to go the end of the string.
    This has really gotten me stumped!

    HI thanks for the help. Unfortunately it doesn't work if the text is longer than the actual textfield. The textfield would still show the end of the text, rather than showing the beginning of the text.
    For e.g.
    |est text|
    is show rather than
    |test tex|
    which is my desired result.
    Any further suggestions please.

  • How to set the margin between panel?

    i have added four panels to a frame by borderlayout, however, i think that they are too close together...
    any method that can be used, such that i can increase the margin between four panels?
    thx

    thx u ...
    however, it just increase the margin between the four
    panels, how can i increase the margin
    between the panel and the frame?
    thx u again..JPanel contentPane = new JPanel(new BorderLayout(4,4));
    // next line answers question above
    contentPane.setBorder(BorderFactory.createEmptyBorder(4,4,4,4));

  • How to set the target directory from source filename using adaptor module.

    Hi,
    How im using a logical bypass scenario.I have to set the target directory using the sorce filename.There is no chance of using a Java UDF as my scenario does not have a Mapping(as it is a Bypass Scenario).The only option that i got is to use a Adaptor module.Can anyone help  me this.
    Thanks,
    Bhargav

    Hi,
    See this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/e9/61e1407e858031e10000000a1550b0/content.htm
    hope it helps.
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.

  • How to set the tables parameter to a BAPI using adaptive RFC model

    Hi,
    I have a BAPI ZBAPI that has a tables parameter ZPernr of type ZTable with two elements pernr and name.
    I used adaptive RFC model and created model classes for the BAPI.
    My question how do i set list of pernr and name to the tables parameter in the webdynpro for java.
    I have the following methods available
    ZBAPI input = new ZBAPI();
    1.ZTable table = new ZTable();
    table.setPernr(pernr);
    table.setname(name);
    input.addZPernr(table);
    how do i set the table parameter for multiple pernr and name
    2.
    add all the pernr and name to list and set that list to input in the following way
    input.setZPernr(list) and list of typecom.sap.aii.proxy.framework.core. AbstractList
    out of two methods mentioned which one is correct.
    Please let me know the solution
    Thanks
    Bala Duvvuri

    Hi Bala,
                In your code:
    List pernrList = new ArrayList();
    pernrList  should be declared as the  type of class HROBJECT   ( The structure name in the model  e.g. the node PERFWARN type is Zhrecmfm_002_Perfrat_Warning_Input )
    Try this:
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr);
    input.setPernr_List(pernrList);
    // call BAPI execute method
    If you want to pass list of pernrs, you can pass in alternate way
    IPrivate<viewname>.I<nodeame>Node prNode = wdContext.node<node>();
    IPrivate<viewname>.I<nodeame>Element prEle;
    for (int i = 0; i < table.size(); i++) {
    HROBJECT  pernrList = new HROBJECT();
    pernrList.setPernr(pernr); // Set the pernr from current record
    prEle = prNode.create<nodeame>Element(pernrList);
    prNode.addElement(prEle);     
    // call BAPI execute method
    Once I execute the BAPI how do i iterate thru second table parameter PERNR_PERFRAT to get pernr and performance rating text
    Say your node name is  PERNR_PERFRAT
    for (int i = 0; i < wdContext.nodePERNR_PERFRAT().size(); i++) {
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPernr();
    wdContext.nodePERNR_PERFRAT().getPERNR_PERFRATElementAt(i).getPerfrat();
    Regards,
    Siva

  • How to set the default Excel cell format when opening XML to XLS using an existing stylesheet​?

    Hi,
    I have an XML file, which I'm opening with the Excel application. The stylesheet I use is horizontal.xsl.
    The problem arised when the XML has data in the format "1/4" or "1/16", which is translated in the Excel as date (like "01/04/2007").
    I think I have to set the default cell type to "Text" instead of "General". Does anyone know how it can be done?

    Is this the same question as idoZo, if so jigg has already answered it. If not then you should post your own query not hijack someone elses giving a clear and concise question, "how to set it??" doesn't help you or other in the forum to provide you with a solution.
    Is this relevant to TestStand? If it is then help by providing which version you are using and what software you are using with it. If not then post your question in the correct board.
    Regards
    Ray Farmer

  • How to set the value of an radio button using set_radio_button_property

    I'd like to set the value of an radio button dynamically, depending of the situation.
    (=> the value which the object returns to the radio group)
    Means: the 'radio button value' of my object 'rb_1' shall be 1, in other circumstances 99 and so on.
    Is it possible to set this value at runtime ?

    the problem is as Gerd wrote:
    there are two or more radio buttons in an option group.
    Their value depends on the text objext t_field.
    If t_field is "car" the value of radio button 1 shall be 75, button 2: 90 and button 3 115.
    if t_field is "bus" the value of radio button 1 shall be 250, button 2: 275 and button 3 300 and so on.
    My problem is to set the value of the radio buttons at runtime after choosing/typing the value of the text field t_field.
    Message was edited by:
    PatrickM

  • How to get the addition DML Error information when using PL/SQL?

    Given the following statements:
    drop table bob;
    create table bob
    col1 number(6,2),
    col2 number(6,2) not null
    insert into bob(col1, col2) values (123.12, null);
    insert into bob(col1, col2) values (123.12, 12345.12);
    commit;
    I get different behavior from Oracle error messages.
    Here is the sample output:
    Table dropped.
    Table created.
    insert into bob(col1, col2) values (123.12, null)
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("BOB"."COL2")
    insert into bob(col1, col2) values (123.12, 12345.12)
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    Commit complete.
    Note that in the first error (1400) the generated error message contains the name of the problematic column ("BOB"."COL2"). Also note that in the regurgitated statement the error pointer (*) is at the far left. In this case, the regurgitated statement is of no use to me because the error message identifies the culprit column.
    However, in the second error (1438) the generated error message is very generic and does NOT indicate the problematic column. In addition, in this case the error pointer (*) of the regurgitated statement has moved to point to the troublesome column. In this case, I must use BOTH the error message and the regurgitated statement to completely understand the problem.
    This difference in how error messages are constructed causes difficulty within PL/SQL. If PL/SQL happens to generate a 1400 error message, then simply capturing the error message and giving it to the user provides enough information for him/her to solve the problem. However, if a 1438 error is generated then the resulting error message has insufficient information for the user to pursue the problem.
    So my question is, within PL/SQL do you know how to get your hands on Oracle's regurgitated statements so that they can be presented to the user to assisted him/her in problem resolution?
    Thanks.

    I don't think it's that easy. Notice that if you put the insert into an actual pl/sql block, you don't get the correct column pointer anymore.
    BEGIN insert into bob(col1, col2) values (123.12, 12345.12); END;
    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column
    ORA-06512: at line 1
    Richard

  • How to format the output of Today() ⨍(x)  when used in a formula

    This table should explain what I'm asking to do. Have the Wed, Nov 2, 2011 applied to a date when I use the Today() function. Without the workaround of refernencing another cell to pickup formatting like I do in the final row.
    Formula
    Cell Format
    Result
    =CONCATENATE("Today is ",TODAY())"
    Date: Mon,Jan 5, 2009 Time: None
    Today is 02/11/2011
    =TODAY()
    Date: Mon,Jan 5, 2009 Time: None
    Wed, Nov 2, 2011
    = CONCATENATE("Today is ",C3)
    Date: Mon,Jan 5, 2009 Time: None
    Today is Wed, Nov 2, 2011

    Hi Barry
    I just discover this thread.
    The main problem here is that as we aren't allowed to define the format used by TODAY() in the described formula, we have to use a formula which is localization dependant which is really annoying.
    For my own use, I will just use two columns :
    In the first one the formula would be :
    =IF(MID(""&1/2,2,1)=".","Nous sommes le","Today is")
    In the second one it would be :
    =TODAY()
    The vertical border between the two columns is set to white.
    But I think that the most efficient answer would be that Apple give us the ability to pass a parameter to TODAY() and/or NOW().
    This parameter would define the format which would remain the current one when the parameter is omitted.
    Yvan KOENIG (VALLAURIS, France)  07 /11 /2011 17:38:15
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • How to prevent the insertion of rollover code when using a template

    Hi there
    I am designing a site in Dreamweaver using templates. These templates use rollover images. The code that DW uses for the rollover I have abstracted out into a separate javascript file, which is linked to in the header. Further, I am using window.onload() to call the preloader instead of the <body> onload event. All this works fine.
    The problem is that every time I make a change to the template, DW re-inserts the rollover code into the head of the HTML file, and reinserts the preloader code into the <body> tag.
    Now, I have found a solution to the <body> tag problem by changing the preload flag from 1 to 0 in the link created; it seems that DW uses this flag as in indication of whether to insert the onload code into the boday tag.  So that part is fixed.
    But I can't find any way to keep DW from inserting the unecessary and redundant rollover code into the head of the generated HTML files.  Is there a way I can prevent this from happening?
    ...Mike  

    Just don't externalize your js until the very last step before publishing.
    You can let the dev team know about this here -
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How to set the margins for the pdf output in BI Publisher

    Hi There,
    When we view a report in PDF format in BI Publisher, we get pdf output in an iframe.
    There are two scroll bars on the right side. When we scroll down the outer scrollbar to the bottom, there is a white space between the bottom border of the pdf report and bottom portion of the window.
    We are calling BI report from apex by passing the url of the report. In this case the white space at the bottom is quite evident and seems that lot of space is being wasted.
    Can somebody help me, how to remove or minimize this white space.
    Thanks
    Krishna
    Edited by: Yogi on Aug 30, 2010 5:41 PM

    Hello,
    open your report for editing, so you see the page with your layouts. Then click on the Link "Show as List" on the upper right. In the List of the output formats select "FO Formatted XML". This enables FO Export.
    Then execute your report, click on the small menu item at the upper right. The Menu opens, select Export -> FO.
    Hope that helps.
    Greetimgs,
    Sascha

  • How to set the view HTML source in IE using Notepad to open?

    When I want to view the HTML source in IE, Java Web Start is launched instead of Notepad after I install the Java Web Start. How can I change the view source back to using Notepad?

    Sorry, a late reply: simply remove (or rename) the JWS Notepad shortcut from your desktop.
    It seems that this "lovely" little example application
    has taken over IE's "view source" feature by trying to
    launch itself in the place of notepad. It would be quite disappointing from the sandbox point-of-view if a JWS application would be able to make such changes without any warning...
    It's more like Windows cannot handle two applications with the same name. Just hold down the Windows key, hit R and type "notepad" in the Run dialog and you'll also get the JWS demo -- while typing "notepad.exe" still fires Windows Notepad.
    Even more strange: typing "notepad" in a MS-Dos box does not fire the JWS demo, even when you change the current directory to be your desktop, like c:\windows\desktop. However, typing "start notepad" in that specific directory does fire the demo...
    Even although in the Windows registry one finds HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Default HTML Editor shows the full path to the Windows notepad.exe, it is simply not using that information. You can't blame that on JWS.
    So: simply removing or renaming the shortcut helps you out. Or, even better: put a shortcut named Notepad on your desktop and make it refer to your favorite editor -- c:\program files\accessories\worpad.exe if you don't have anything better -- this will make searching the source code in IE much easier...
    Arjan.

  • How to set the format 123,456.78 by using DecimalFormat

    hi all,
    i have issue with display of following format number :123,456.78
    i have used the foll pattern for it: "#,##0.0#"
    Output is: 12,345,678.00
    Needed is: 123,456.78
    pls help me out.We are having a serious issue in our project.looking fwd for a immediate reply.
    cheers,
    sharath

    hi all,
    i have issue with display of following format
    mat number :123,456.78
    i have used the foll pattern for it: "#,##0.0#"
    Output is: 12,345,678.00
    Needed is: 123,456.78
    pls help me out.We are having a serious issue in our
    project.looking fwd for a immediate reply.
    cheers,
    sharathI suppose you're passing number "12345678" instead of "123456.78"
    try dividing the number by 100...

Maybe you are looking for