How can I set a gap in a JTextField, before the active Textfield starts?

Hi,
how can I set a gap in a JTextField, before the active Textfield starts?
I'll avoid, that the input text starts immediately after the border of the JTextField.
Btw, how can I set the height of the JTextField in a BoxLayout?
Thx.
Hans

Yes, that was also my thinking, but nothing happens.
Maybe You have an idea :-)
Thx, Hans
Here a part of my code:
  private JPanel createEntry(String label, JTextField jtf, String initJtf, boolean editable) {
    jtf.setColumns(15);
    if (editable) {
      jtf.setEditable(true);
      jtf.setBackground(new Color(191, 191, 255));
    else {
      jtf.setEditable(false);
      jtf.setBackground(SystemColor.control);
    jtf.setText(initJtf);
    jtf.setForeground(Color.black);
    jtf.setBorder(BorderFactory.createLoweredBevelBorder());
    jtf.setMargin(new Insets(50, 20, 50, 40));   // <-  The PROBLEM
    JPanel panel = new JPanel();
    GridLayout gl = new GridLayout(1, 2);
    gl.setHgap(1);
    panel.setLayout(gl);
    panel.add(BxpCdmUtils.Utils.createLabel(label, Color.darkGray, Font.BOLD, 11));
    panel.add(jtf);
    JPanel superpanel = new JPanel();
    superpanel.setLayout(new BoxLayout(superpanel, BoxLayout.X_AXIS));
    superpanel.add(panel);
    superpanel.add(new JLabel(" "));
    return superpanel;
  }

Similar Messages

  • How can I set up an older airport express using the newest airport utilities?

    How can I set up an older airport express using the newest airport utilities? Seems like there isn't an option to set this up.  Normally you could add/set up this in the airport setup assistant- but that doesn't exsist any longer.
    Thanks for any suggestions 

    How can I set up an older airport express using the newest airport utilities?
    Unfortunately you can't, since Apple dropped support of the older AirPorts with AirPort Utility 6.x.
    Using some workarounds....not supported by Apple.....you might be able to download and install an older version of AirPort Utility that would allow you to administer the older AirPort.
    See this thread for more details and instructions:
    https://discussions.apple.com/message/21397085#21397085

  • Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Gavin Lawrie wrote:
    Once it had been established that the iWork rewrite had resulted in some features being lost and others broken, and once Apple had acknowledged the concerns* and suggested they are working on fixes**, I'm not sure what else there is to achieve.
    You are writing that in the perspective of having read about it here already. Repeated often enough that you encountered it somewhere in the posts.
    Users are flooding in here and don't know any of this. Of course we have to repeat everything endlessly.
    Because I like to give precise, understandable and workable answers to repeated questions, and Apple doesn't allow sticky posts here, I created a separate forum which users can consult to look up real answers, and contribute for themselves if they have something valuable to add:
    http://www.freeforum101.com/iworktipsntrick/
    There is a section purely devoted to Pages 5. Add whatever answers you feel will lighten the problems of Apple's 'upgrades'.
    Peter
    * Where have they acknowledged anything?
    ** They have barely anything listed, compared to the massive list of deleted features, and nothing but an extraordinarily long time frame considering they created the problems here and now. Apple has not said they will do anything at all about fixing the real issues, the biggest of which is that the new iWork apps break virtually all the work of existing users.

  • How can I set a value in a field before create when a New button is clicked

    Hi,
    I am using
    JDeveloper 10.1.3.1.0.3984 and
    JHeadstart 10.1.3.1 release 10.1.3.1.26
    I have one group and there is a detail group under that group.
    From main group to detail group there are 3 field relating those groups.
    field1
    field2
    fieldSEQ (auto-generated by database trigger)
    These 3 fields are PK.
    In the detail group, there is a New button. So, when the New button is clicked, it tries to create the record with those 3 fields value as those are coming from main group. As a result it's giving the duplicate error as that record already exists in the table.
    But I don't want to create the record with that SEQ as that will be created in the trigger.
    How can I set the SEQ temporarily any no. (-1) before create when the New button is clicked?
    Can anybody help?
    Thanks
    Syed Jabbar
    University of Windsor
    Windsor, ON, Canada

    Hello Syad,
    What I would suggest is setting the sequence number at the creation of the entity object (so in the create() method) by using the database sequence. This way it will always be unique.
    So something like:
    protected void create(AttributeList AttributeList) {
    super.create(AttributeList);
    SequenceImpl sequence =
    new SequenceImpl("KCP_SEQ", getDBTransaction());
    setFieldSeq( sequence.getSequenceNumber());
    If this still does not solve it: please go to the ADF Forum since this problem is an ADF problem, not a JHeadstart problem.
    Regards,
    Evert-Jan de Bruin
    JHeadstart Team.

  • How can i set a column which would show me the name of the user

    how can i write a trigger which would show me the name of the user now make changes in the table.

    872959 wrote:
    how can i write a trigger which would show me the name of the user now make changes in the table.I think what sb is trying to say is: if you mean the database user, you can use the USER session variable to identify the database user:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions227.htm#SQLRF06156
    you would write a before each row trigger to update an "updated_by" column on your table to be USER.
    e.g.:
    :new.updated_by := USER;

  • How can I set a polygon's path by using the .add() function?

    I have been searching the web and this forum and doing plenty of experimenting, and I can't for the life of me figure out how to do this.
    I can set other attributes of a polygon inside the add() parentheses, such as the fillColor, but I can't set the polygon's path's pathPoints unless I use a separate line of code after the add(); line.
    My script adds a great deal of polygons in a row, so halving the number of operations would greatly help me, and also it seems that some properties such as appliedObjectStyle cannot be set until after a polygon's path is defined. That means I need a third line of code after add() and entirePath=, which slows me down even more.
    Help?

    Ryan, I think you need to reset and take a moment to understand what it is that is going on here.
    The things you've proposed that don't work shouldn't work, and it's all quite simple.
    Generally speaking, a .add() function takes an additional parameter, a JavaScript Object, that list properties of the created object that can be set.
    A JavaScript Object is a list of key/value pairs, just like an associative array in a language like perl, or a dictionary in a language like Python. It is expressed in curly braces as such:
    { key1: value1, key2: value2, key3: value3}
    So, for any such general add function, these
    foo = whatever.add();
    foo.bar = baz;
    are equivalent to this:
    foo = whatever.add({bar: baz});
    Are you with me? So, for instance, you had originally asked why you could not use pathPoints in polygons.add() and the answer is simpe. You cannot set polygon.pathPoints, because there is no .pathPoints property of a polygon.
    So, when you want to try add properties inside properties, you must do as as objects within objects, and follow the strict hierarchy. Marc advises that this works:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
    and if indeed that is so, then the extension for setting multiple transparencySettings should be clear. It is not this, that you propose:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {angle:120}}
        transparencySettings: {dropShadowSettings: {distance:1}}
    Because to do so is to set the transparencySettings key twice in the same Object. And to do that is to replace the first with the second. The above (yours) is wholly equavelent to:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings: {dropShadowSettings: {distance:1}}
    If you wish to set more than one attribute of dropShadowSettings, you must set transparencySettings to an object containing one and only one dropShadowSettings, and you must do it only once. So it is this:
    app.activeWindow.activePage.polygons.add({
        fillColor:"FireRed",
        transparencySettings:
          {dropShadowSettings: {angle:120, distance: 1}}
    I am not sure why you thought you should have the name of the key in the Object named properties. That is probably because in some cases you can use:
    foo.properties = { a: 1, b: 2};
    as a shorthand for
    foo.a=1;
    foo.b=2;
    but you would [probably] never want to mix that with the object notation for setting multiple properties in the .add() function.
    Does this help to clarify?
    As for your last question:
    Also, it doesn't let me use square brackets or parentheses inside the add() parentheses, so the original problem I posted (trying to set a polygon's path) is still a problem.
    It's not about the use of brackets or parentheses, but what they mean and where they go. As you have not posted an example of setting the polygon's path the long way, it's hard to show you how to shorten it. Post what you have that works, and we will show you how to shorten it. (I suppose some with more patience than I are willing to go look up what we think it is you are trying to do, and then interpret it. But I would much rather you show me the code you have that works, and then your attempts to transform or shorten it and change its notation. This makes it much much easier to help you, and it should also make the help more effective, by contextualizing it. As an added benefit, when someone else reads your post and tries to learn from it, they will gain more.)
    So again, please provide a clear example of the "long way" to do the thing you are attempting, and then your attempt at shortening it.

  • How can I set up two i tunes accounts on the same i mac for different profiles

    I have set up two profiles on my new i mac. I now want to access two different i tunes accounts but when downloading the second account I get a message saying the computer is already set up with an apple id and if you download you can not auto download !! for 90 days ??? I don't understand this

    Jus don't turn on Autodownload (iTunes prefs > Store).
    Autodownload simply tells iTunes to automaticall download items if you purchase them elsewhere (such as a different computer or iPhone/iPad).
    You can still download them when your purchase them on the computer or go to iTunes store in iTunes, select Purchased on the right side under Quick Links.

  • HT1491 How can I set a purchased tune to my ringtone - the above instructions are not working

    Hi, I have my new iphone here with me, I am really struggling to set a tune that is on the iphone as my ringtone - can anyone help? Many thanks. BTW it is a tune that I have purchased through Tunes on the phone so I can see and play it on the phone.

    Thank you. I could not find a way to reply to you I did not see the reply button. So I thought I had to just post it again.
    I only want to put up a twitter button on to my webpage. I have already put up the text from twitter on to my website and this link works [ I think}  but not the graphic of the button. I want to do the follow buttton which was not listed on the address above.
    I tried the address for my blog you suggested and it did not work.Will this address be on my website somewhere.
    Still confussed.

  • How can I set my background so it repeats and the background is then square next to square?

    Hard to explain but basically like that...

    Do you have a Pop or IMAP mail account?
    Pop mail accounts can only connect to server and see the Inbox. Emails are downloaded from server Inbox to mail account Inbox.
    re: 'For example If I create a folder and move some of my mails there,'
    Did you create the folder in Thunderbird or in webmail?
    Do you have this setting? View > Folders > All

  • How can I set up tablet shortcut menu button for the middle button my X230T?

    I think I have a faulty X230T, there are now only three tablet buttons and the middle does not do anything. I have installed 7wg737.exe (tablet short menu for Win7), but it does nothing.
    When I go into Tablet PC setting>buttons, only one button shows up and that's the screen rotation button. 
    Is there a way to assign the middle button to shortcut menu? Otherwise I'm unable to change brightness or volumn during tablet mode which would make this tablet unusable.

    Hi Susan,
    Try Butler...
    http://www.versiontracker.com/dyn/moreinfo/macosx/20035

  • How can I set Firefox to open a new page each time it starts

    I need to be able to start automatically a new page when Firefox start. I have my home page setup but I'd like to start a new url in a new window each time Firefox is started.
    Thanks

    See this - http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • How Can I set up a JTable columns?

    Dear All,
    How can I set up my JTable columns to have the amount the user specifies?
    for example when the user types in 50 in JTextField 1 I want the JTables columns to then set to 50.
    How can this be done?
    Thanks
    lol
    import javax.swing.*;
    import javax.swing.table.TableModel;
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class si1 extends javax.swing.JFrame implements ActionListener {
        JTextField name = new JTextField(15);
        JTextField name1 = new JTextField(15);
        public si1() {
            super("DataBase Loader");
            setSize(1025,740);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel pane = new JPanel();
            JPanel pane1 = new JPanel();
            JPanel pane2 = new JPanel();
            JPanel pane3 = new JPanel();
            JPanel pane4 = new JPanel();
            pane.setLayout(new GridLayout(20,1));
            pane1.setLayout(new BorderLayout());
            int j=10;
            String[][] data = new String[j][2];
            for (int k=0; k<j; k++){
               String[] row = {"",""};
               data[k] = row;
            String[] columnNames = {"First Name", "Last Name"};
            JTable perstab = new JTable(data, columnNames);
            perstab.setGridColor(Color.yellow);
            perstab.setPreferredScrollableViewportSize(new Dimension(500,500));
            JScrollPane scrollPane = new JScrollPane(perstab);
            pane1.add(new JPanel(), BorderLayout.EAST);
            JButton btn = new JButton("What are the names?");
            btn.addActionListener(this);
            btn.putClientProperty("DATABASE", perstab);
            pane1.add(new JPanel().add(btn), BorderLayout.SOUTH);
            pane2.add(name);
            pane3.add(name1);
            pane.add(pane2);
            pane.add(pane3);
            pane1.add(pane, BorderLayout.WEST);
            pane4.add(scrollPane);
            pane1.add(pane4, BorderLayout.CENTER);
            setContentPane(pane1);
            show();
        public static void main(String[] args) {
            si1 frame = new si1();
            frame.setVisible(true);
        public void actionPerformed(ActionEvent e) {
            JTable table = (JTable)((JButton)e.getSource()).getClientProperty("DATABASE");
            TableModel model = table.getModel();
            int count = model.getRowCount();
            String[] firstnames = new String[count];
            String[] lastnames = new String[count];
            for (int i=0; i < count; i++) {
               firstnames[i] = (String)model.getValueAt(i, 0);
                System.out.println("first name at row " + i + ": " + firstnames);
    lastnames[i] = (String)model.getValueAt(i, 1);
    System.out.println("lastname name at row " + i + ": " + lastnames[i]);

    As you can see I have tried this, but no success.
    If I am doing something wrong please accept my apology, and address me in the right direction.
    Thanks
    Lol
    import javax.swing.*;
    import javax.swing.table.TableModel;
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class si1 extends javax.swing.JFrame implements ActionListener {
        JTextField name = new JTextField(15);
        JTextField name1 = new JTextField(15);
        public si1() {
            super("DataBase Loader");
            setSize(1025,740);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel pane = new JPanel();
            JPanel pane1 = new JPanel();
            JPanel pane2 = new JPanel();
            JPanel pane3 = new JPanel();
            JPanel pane4 = new JPanel();
            pane.setLayout(new GridLayout(20,1));
            pane1.setLayout(new BorderLayout());
            int j=10;
            String[][] data = new String[j][2];
            for (int k=0; k<j; k++){
               String[] row = {"",""};
               data[k] = row;
            String[] columnNames = {"First Name", "Last Name"};
            JTable perstab = new JTable(data, columnNames);
         ((DefaultTableModel)perstab.getModel()).setColumnCount(Integer.parseInt(name.getText()));
            perstab.setGridColor(Color.yellow);
            perstab.setPreferredScrollableViewportSize(new Dimension(500,500));
            JScrollPane scrollPane = new JScrollPane(perstab);
            pane1.add(new JPanel(), BorderLayout.EAST);
            JButton btn = new JButton("What are the names?");
            btn.addActionListener(this);
            btn.putClientProperty("DATABASE", perstab);
            pane1.add(new JPanel().add(btn), BorderLayout.SOUTH);
            pane2.add(name);
            pane3.add(name1);
            pane.add(pane2);
            pane.add(pane3);
            pane1.add(pane, BorderLayout.WEST);
            pane4.add(scrollPane);
            pane1.add(pane4, BorderLayout.CENTER);
            setContentPane(pane1);
            show();
        public static void main(String[] args) {
            si1 frame = new si1();
            frame.setVisible(true);
        public void actionPerformed(ActionEvent e) {
            JTable table = (JTable)((JButton)e.getSource()).getClientProperty("DATABASE");
            TableModel model = table.getModel();
            int count = model.getRowCount();
            String[] firstnames = new String[count];
            String[] lastnames = new String[count];
            for (int i=0; i < count; i++) {
               firstnames[i] = (String)model.getValueAt(i, 0);
                System.out.println("first name at row " + i + ": " + firstnames);
    lastnames[i] = (String)model.getValueAt(i, 1);
    System.out.println("lastname name at row " + i + ": " + lastnames[i]);

  • How can I set Firefox to print to PDF, the only otions I have are (1) My Canon printer, (2) Fax or (3) Microsoft XPS document writer. There is no option for PDF

    A couple of weeks ago, from the file menu, in my print options was to print a web page to PDF, that facility is no longer there. does anyone know how can I set Firefox to print to PDF.
    The only options I have are (1) My Canon printer, (2) Fax or (3) Microsoft XPS document writer. There is no option for PDF

    Firefox generally displays the printers in Windows' Printers folder (Start orb > Devices and Printers). If it is missing one of the printers listed there, could you indicate which one it is, for example, Adobe Distiller, PrimoPDF, CutePDF Writer, etc.?
    If you previously had an add-on which added print-to-PDF functionality just to Firefox, perhaps it got disabled. You could check here:
    orange Firefox button ''or'' classic Tools menu > Add-ons > Extensions
    Also, are you really running Firefox 8.0.1? That version from last November is no longer secure and has been superseded by Firefox 11. If you browse the web widely, you should update for your security.

  • How can I set up cross fade to automatically trim files ?

    How can I set up cross fade to automatically trim the two files to size when fading between them? Thanks

    Hi, thanks for the reply. What I meant was that in Pro Tools, you can highlight an area between two tracks and crossfade. Then the files are exactly trimmed automatically so there is no excess overlap of the edges of both files. In Logic it seems to leave the overlap, and this can be a problem when you accidently click the wrong place and the underlying file is bought to the front, changing the crossfade area. I wish it to trim the excess so there is no danger of the lower file edges coming forward.

  • Hi Edge community,  How can I set a custom colors

    Hi Edge community,
    How can I set a custom colors & font size
    to the Adobe Edge Animate CC 2014
    work space (stage, time lone, tools, etc...)
    to get something close to this?
    http://www.vrmall.eu/vr/EDGE_WORKSPACE_BLACK_n_WHITE/EDGE_WORKSPACE_BLACK_n_WHITE_r.01.jpg
    Thanks a lot for Your time and help.

    Hi Robyn_cpl,
    thanks for the useful link - based on this I decided to
    purchase the PDF of Adobe Edge Animate: The Missing Manual
    by Chris Grover. Good book indeed, work space panels resizing
    and docking are covered, but there is nothing on colors&fonts...
    I've been searching  intro's, tut's, forums on Edge, but no hint
    on this... But I keep searching You Tube, Google, etc...
    I'm intended to submit the subject to Adobe Edge Support.
    Thanks again for Your attention

Maybe you are looking for

  • Sound only works from one port

    My sound only works when I use the output port on the back of my computer, but I'd also like to use the one at the front of my computer for convenience. What setting am I supposed to change to do this? Here is some information about my system. ~ > ca

  • How to save PDF with fields so someone can fill out form and send it to printer

    Using Adobe Acrobat X for Mac, I built a pdf template with fields for sending an assortment of Business Card files to the printer to print. How do I save the file so my brother/client can start typing in different names, job titles, and contact info

  • Upgrade from 10.1.2.0.0 to 10.1.2.0.2 is not support ??!!

    I was hoping to be able to upgrade our App. Server from 10.1.2.0.0 to the 10.1.2.0.2 version which now includes Forms and Reports, but Oracle is saying that there is NO upgrade path from 10.1.2.0.0 to 10.1.2.0.2 . I find this very disconcerting, as i

  • Displaying Single Datablock field in Multiple Record Data Block

    Hi all I have a master detail block for cash transaction recording. Master Table name CahMaster and datablock contains columns Cash Bill No, Date, Customer ID, Misc Freight Charges. Detail Table name is CashDetail and datablock includes product id, p

  • After Effects CS6 Crashing on Start up - Invalid Type Conversion

    Hi Guys, I just installed Adobe After Effects CS6 - along with photoshop, indesign and illustrator, all of which are working fine. When I start After Effects up it goes until it gets to Initializing User Interface. There it stops and I get the messag