JFormattedTextField creating spaces in field

Hi, I am working with a JFormattedTextField, I am using the tutorial from Sun, but once the text field is created it already has spaces put in the field. I tried using setText and it still has them either way.
import java.awt.Container;
import java.awt.FlowLayout;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.text.MaskFormatter;
public class test extends JFrame {
     private JTextField InputLoc;
     // I have also set InputLoc to be a JFormattedTextField
     Container mainWindow;
     public test() {
          makeInput();
          mainWindow = getContentPane();
          mainWindow.setLayout(new FlowLayout());
          mainWindow.add(InputLoc);
     private void makeInput() {
          InputLoc = new JFormattedTextField(createFormatter("###########"));
          InputLoc.setText("");
     protected MaskFormatter createFormatter(String s) {
          MaskFormatter formatter = null;
          try {
               formatter = new MaskFormatter(s);
          } catch (java.text.ParseException exc) {
               System.err.println("formatter is bad: " + exc.getMessage());
               System.exit(-1);
          return formatter;
     public static void main(String[] args) {
          test gui = new test();
          gui.setSize(80, 80);
          gui.setVisible(true);
}The code should compile and will show you what is going on. Please let me know what the problem is.
thanks
Joe

Please let me know what the problem is. I don't know what the problem is, because I can't tell from your description how you expect that code to behave. The code is doing what you tell it to do, so if you want it to do something different, we'll need to understand what that something is...
~

Similar Messages

  • How do I create a text field the scrolls mutliple pages in Adobe Pro XI

    How do I create a text field that when filled in the alloted space on one page it opens a second page?

    Search the forum for "auto tab"...

  • How to create space between Header text of Hierarchical ALV List.

    hi,
    I am display data using Hierarchical ALV List.
    In Perform of field catalog, I am writing this code:
    PERFORM fill_catalogue USING :
         'CHKBX'      'T_HEADER' 20  'Sess Decision Box'(t19) 'X',
          'SESS_NO'    'T_HEADER' 11  'Session'(t20)           ' ' ,
          'SESS_STAT'  'T_HEADER'  4  'Status'(t39)            ' ',
          'HOLD_STAT'  'T_HEADER'  4  'HOLD'(t52)              ' ',
          'ICON'       'T_HEADER'  9  'Tracking'(t21)          ' ' ,
          'CREATE_DT'  'T_HEADER' 10  'Archiving Date'(t22)    ' '  ,
          'AGING'      'T_HEADER' 50  'Aging'(t23)             ' ',
          'OBJECT'     'T_HEADER' 12  'Archive Obj'(t24)       ' ',
          'HOLD_INFO'  'T_HEADER' 100 'Hold Reason'            ' ' ,
          'YFY_DATA'   'T_HEADER' 4  'Data Fiscal Year'(t48)  ' ' ,
          'COMMENTS'   'T_HEADER' 50  'Session Notes'(t26)     ' ' ,
          'DATATYPE'   'T_HEADER' 50  'Archive Object Description'(t25) ' ',
          'APPR_STAT'    'T_ITEM' 16  'Approval Status'(t29)   ' ',
          'DESTR_DT_REV' 'T_ITEM' 10  'New Date'(t30)          ' ',
          'REJCT_REASON' 'T_ITEM' 60  'Rejection Reason'(t31)  ' '  .
    At output of this program , there are two rows in HEADER details.
    I want text 'Session notes' of 2nd row  under 'Archiving Date' of 1st row.
    For this i have to create space between 'Data Fiscal Year' & 'Session notes' text.
    How i can do this.
    Regards,
    Mamta

    Hi,
    You can use TOP-OF-PAGE event and pass this event to Hierarchical ALV FM.
    Thanks,
    Kartavya Kaushik.

  • Space between fields in a page

    Hi,
    I have around 5 fields in a custom page one below the other. But i am unable to figure out how to create space between those fields vertically?
    Any suggestions are appreciated.
    Thank you

    create new item and set its type as spacer
    hope this helps
    --Prasanna                                                                                                                                                                                   

  • Reduce field size and space between fields

    Is there any trick to reduce the size of a field more than "normal" and the space between fields?
    I'm creating a form that looks like at table of 5 rows and 8 columns.
    Some of the fields is with list function, and they in special take more space than other fields.
    When changing the form layout in the web browser I could move the "listfields" to different places and suddenly I can for example reduce them from 124 to 114 that is the smallest I have seen them. Also if try to reduce the same field later it just pops up from 114 to 139.
    The space between fields is also annoying large when I try to keep this form as small as possible.
    Why am I asking for this?
    I know I can increase the size of the form, but I want it as small as possible for the smartphones.
    The "listfields only contains number from 1 to 9, so they can be very small.

    Hi,
    We currently have minimum widths defined for each field type. It shouldn't be possible to reduce the size of a field below that minimum width. If possible, could you please share your form with me ([email protected]) to allow me to investigate the behavior that you are seeing with your "listfields"? Also, could you describe how you were moving fields when you saw the field width reduce from 124px to 114px?
    Instructions for sharing a form can be found here - http://forums.adobe.com/docs/DOC-2462.
    Currently the spacing between fields cannot be modified.
    Regards,
    Brian

  • AET error while creating a new field

    Hi Experts,
    We have a requirement to create a check box/newfield on Account Details screen in Web UI. I am trying to create a new field using AET but am getting the following error message. Please help.
    1. Error during generation of object CI_EEW_BUT000
    2. Customizable CSOL conflict for objects changed in other TR.
    We have a config TR involving the role field on account details component (BP_HEAD/ACCOUNTDETAILS). Do we need to release the transport before creating any new fields.
    The generation of the field fails when I select the extension and click on 'SAVE and GENERATE'.
    Please help.
    Thanks,
    Rohit

    Hello Rohit,
    Please  apply note 1707978 to solve the issue.
    thanks
    Willie

  • How to find out the user who has created  a new field in the custom table.

    How to find out the user details who has created  a new field in the custom table.
    Thanks,
    Joan

    Hi Jesudasan ,
    You can know the user details with version management.Please find the
    below procedure to know.
    Go to table->Utilities tab->version->Version management->Compare the previous one .
    Hope this solves the issue,Let me know if you have any issues.
    Thanks,
    Rajani

  • How to create a new field for Q3 - QM notification in Header and item level

    Dear All,
    l
               Sub: How to create a new field for Q3 - QM notification in Header and item level
    Ref. the link --> Quality Notification
    We want to create a new field in header level and item level.
    As per the thread the solution is given below.
    In the IMG Config: Quality Management -> Quality Notification -> Notification Types -> Define screen areas for notification types Then Choose 'Define screen areas' Then Click on 'New entries' button Now, select the relevant Notification Type and click in 'Enter'. Select the 'Iten Cases' register and remember to setup the Tabstrip Header, Icon, etc. Set the 'Tabstrip active' flag. Then Save.
    Quality Notification -> Notification Types -> Define screen areas for notification types
    WE ARE UNABLE TO FIND IN CUSTOMIZATION PATH --> DEFINE SCREEN AREAS FOR NOTIFICATION TYPES.
    Please help.
    Question No. 2 :
    THE REQUIREMENT IS GIVEN BELOW.
    We want to hide the field in Q3 - QM Notification
    In header --> Reference tab --> Item (sub heading) --> "DEFECT LOCATION" FIELD TO BE ELIMINATED (HIDE)
    Ref the link --> Quality notification
    The solutiion is given below.
    Hi Sami,
    We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
    Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
    Hope this will suffice your requirement.
    Kindly ask me if you need any other details.
    Thanks & Regards,
    Srinivas.D
    Hi Sami,
    We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
    Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
    Hope this will suffice your requirement.
    Kindly ask me if you need any other details.
    Thanks & Regards,
    Srinivas.D
    By double clicking the "DEFECTIVE QUANTITY (EXTERNAL), WE COULD NOT GET --> field TXTCDOT .
    Plese do the needful.
    We are using ECC6.0 Ehp3 and Ehp4.
    With Best Regards,
    Raghu Sharma

    Dear Pushpa,
    Transaction Code :SHD0 is working fine.
    Please accept my sincere thanks for your sharing your Knowledge.
    I am able to fulfill my
    Regarding the enhancement, I have not tried.
    Once I will complete, I will award the fulll marks to you.
    With Best Regards,
    Raghu Sharma

  • Can I create a salutation field to print labels like, "Rob & Julie Smith" ?

    I want to send Christmas cards to my friends in Address Book. But when I print the address labels up, I want something to appear other than the standard "firstname lastname" on the top line of the label.
    Can I create a custom field, like a salutation field, so that when that particular label is printed, instead of showing "Rob Smith" on the first line it would show:
    "Rob & Julie Smith"
    Does this make sense?

    nevermind.

  • Creating a new field in assignment block  through EEWB

    Hi,
    I need to create a new field in an Master data --> Listings --> Listing items/Products assignment block. I do not have option to use AET (using CRM 7.0) for this assignment block. I think I should use EEWB only.
    Now, how can I find the right EEW Bus. object and the extension type to create new fields.
    Please suggest.
    Thanks,
    Praveen

    CRMCMP_LST/CondRecDispView.
    Here I would like to create new field in the header area. I found that the structure used by the BOL entity, in this view, cannot be enhanced. This new field will be defaulted according to the user information everytime the user creates a new Listing.
    Also, this field should be available in display view.
    Please suggest.
    Thanks,
    Praveen

  • How can I create a custom field in contacts and have it appear in ICal?

    How can I create a custom field in contacts (death date) and have it appear in calendar?
    Birthdays seems to work fine but I'd like to do the same for a custom field called Date of Death

    By default, iTunes convert files to type AAC which has an extension of .m4a
    For iTunes to recognize them as Audiobook files, the extension needs to change from .m4a to .m4b
    This can be done a number of different ways. Here are 2 (beginner and advanced)
    . simply, by renaming each file from windows explorer
    . more complex, by using Start/Run/cmd to get a "DOS" type window,
    using the command "cd" to change to the directory that your files are in
    and entering "ren *.m4a *.m4b"

  • Creating a new field in an exisiting info cube ?

    Hi All !
    How do I create a new field in an exisiting Info cube ?
    rgards
    Tom.

    Hai Tom...
             Go to the Existing InfoCube...
             Select and Double Click it...
             The InfoCube Characteristic Window will Come to the Screen..
              That has many additional Functions Like data View && Dimensions && Navigate Attributes...
              In the Bottom of that Fuction Tags You will see the Tags like Structure && Templates....
              Select the Fields that was you like in the Template You Just Select and press the <- Symbol. It will add to the InfoCube as a Field.....
                                                                                    BalajeeKannan

  • Create a new field in sales order

    HI folks i want to create a new field in sales order item level how can i create

    Hi,
    Hope this will help you,
    User exits in the screens
    Additional header data is on screen SAPMV45A 0309, additional item data on screen SAPMV45A 0459. These screens contain the Include screens SAPMV45A 8309 or SAPMV45A 8459 as user exits.
    Fields which are also to be included in the sales document for a specific installation should be included on the Include screens for maintaining. If an application-specific check module is needed for the fields, this can be included in the Include MV45AIZZ. The module is called up in the processing logic of the Include screens.
    For field transports, you do not have to make changes or adjustments.
    Example
    A new field, VBAK-ZZKUN, should be included in table VBAK.
    If the check is defined via the Dictionary (fixed values or check table) the field must be included with the fullscreen editor in the Include screen SAPMV45A 8309. In this case, no change has to be made to the processing logic.

  • Crystal Reports XI - How  to create a new field using a formula field

    I'm quite new to CR, but have been learning quickly!
    I would like to know how to automatically create a new record/field based on another field in that row...
    I have a report showing the following data:
    Run Code     Start KM    Stop KM    Status 
    H2                 100            150           Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    The status is generated by comparing the 'Start KM' and 'Stop KM' against fields in another table called 'Start Odo' and 'Stop Odo'
    In this example...
    H2 has 'Start Odo' and 'Stop Odo' values of 90 to 160, therefore there is still 90-100 to check.  The 'Start KM' and 'Stop KM'  is equal to the 'start Odo' and 'stop Odo' for S3, therefore it shows completed.
    My question is how do you create a formula field, which will add an entire row...displaying the values 90-100.
    I've been trying to use a conditional check in the 'Start KM' column, that sees if status is equal to partial than if start km is greater than start odo (Which is the reference km) then display the value of start odo in the new row. I'm stuck at how to create a new row.
    I want the final result to look like this...
    Run Code     Start KM    Stop KM    Status 
    H2                  90              100         Partial
    H2                 100             150          Partial
    H2                 150             155          Partial
    H2                 155             160          Partial
    S3                 120             150       Completed
    Any suggestions would be more than appreciated

    Hi Adi
    Looking at your examples it seems that you want to add a row to the existing recordset (rows fetched from the database).
    If it is the case (even if based on a formula) then you can not do it within crystal. Crystal is designed to display data and ideally it should not generate the new data.
    However, as per your requirement you can try to add this logic at database end. May be a command object within Crystal Reports can help you.
    Let me know if you do not understand anything.
    Regards
    Nikhil

  • How to create a new field in a sub screen in material master. ?

    How to create a new field in a sub screen in material master. ?
    Kindly help us.
    LIke wise tell me how to create a new sub screen as per my desired

    Follow the documentation of Logistics - General->Material Master->Configuring the Material Master->Create Program for Customized Subscreens  to add the new field in material master.
    Create Program for Customized Subscreens
    In this IMG activity, you can create a function group of your own by copying function group MGD1 (for industry) or function group MGD2 (for retail). The subscreens are not copied, except for two subscreens which are copied for technical reasons. You can use this copy to create subscreens of your own which you can assign to a data screen in the activity Define Structure of Data Screens for Each Screen Sequence.
    Requirements
    Be sure to read the program documentation first.
    Activities
    1. Create a function group of your own by choosing Execute.
    2. Enter a name containing up to 25 characters, beginning with the letter Y or Z, and choose Save.
    3. Access the Object Navigator.
    You do this from the SAP standard menu by choosing Tools -> ABAP Workbench, and then Object Navigator.
    4. Display either program SAPLMGD1 (industry) or SAPLMGD2 (retail) as required.
    5. Copy the subscreens as required, ensuring that they already contain as many as possible of the field names you want to use in your function group. You do this as follows:
    a) Choose Screens, position the cursor on the corresponding subscreen, and choose Copy in the context menu.
    b) Enter the program to which you want to copy the subscreen, prefixing it with SAPL, and enter a screen number. Use the screen number of the original subscreen where possible. If the F1 help is specific to a particular subscreen, this ensures that this context-specific help continues to be displayed.
    Example
    You have called your function group YENTERPRISE, to which you want to copy subscreen SAPLMGD1 2301. Enter SAPLYENTERPRISE as the program to which the subscreen is to be copied, and enter (preferably) 2301 as the screen number.
    6. Return to the initial screen of the Object Navigator and display your program. In the example above, you would enter SAPLYENTERPRISE.
    7. Choose Update object list.
    8. Select the subscreen you have copied and activate it by choosing Activate in the context menu.
    Using the Screen Painter, you can remove fields you do not require on the subscreen or include additional fields from other subscreens (see the ABAP Dictionary). For information on the Screen Painter, see the SAP library documentation BC ABAP Workbench Tools.
    Points to consider when removing or adding fields
    Make sure that a field statement exists for each field on the subscreen since data may not otherwise be transported correctly. You can use subscreen SAPLMGD1 2002 as an example.
    For the fields you have added, include any check modules and modules for self-programmed F4 help that are called up for these fields on the original subscreen. You can do this by displaying the flow logic for the original subscreen and searching for such modules. They normally have the same names as the fields themselves. When you find a module, copy the corresponding module call to your subscreen.
    If you change the order in which fields are transported that are checked together in the flow logic (such as the safety stock and minimum safety stock), you must deactivate the check module for the first field and activate it for the second. The system would otherwise transport the first field, and carry out the check before the second field is transported.
    Any error messages that fields are unknown when activating the subscreen are due to the fields still being included in checks, even though you have removed the fields from the subscreen. Search for the fields in the source code and make the lines in which they appear comment lines. Then reactivate the screen.
    9. Assign the subscreen to a data screen as required.
    Note on transport
    Use the Workbench Organizer to transport the copy you have created.
    Proceed

Maybe you are looking for

  • Some records stays in Event Polling Table forever and ever

    I have configured Event Polling Table at Oracle BI. It works fine and the entry cache are purged. But some records stays in EPT table for ever. Records without misstat1 are inserted by me (trigger). Records with OTHER=misstat1 are inserted by BI Serv

  • Adding network switch to external WAN to increase number of ports available

    This may be a stupid question but this has kinda been landed on me so I'll ask anyway. We have a Cisco router with ethernet connection to our provider's NTE.  They provide us with one ethernet port on the NTE which we connect to the WAN port on our C

  • Language for Dictation?

    What language does the dictation feature of the new iPad use? Is there a way to change the language, or is it always the same language that you use for the entire iOS on the iPad?

  • Pauses between tracks? (Brutal 1 or 2 second interruption between tracks)

    I would like to know if there is a way to program the iPod so that when I'm listening to an album that is supposed to be heard in continuous playback (no pauses between tracks, like in operas, some new age albums and classical music) I can hear it wi

  • Exp question

    I issued the following command to backup all objects owned by msd. exp msd/msd owner=msd file=/d1/dhurley/msd.dmp log=/d1/dhurley/msd.log \ compress=n direct=y recordlength=32768 The logfile is as follows Connected to: Oracle8i Enterprise Edition Rel