Centralizing text in JButtons in a JPanel with a boxLayout doesn't work!!!

Hello, I tried to use the JLabel constructor:
JLabel saveButtonLabel = new JLabel("Save", JLabel.CENTER);
and then put it in the JPanel:
controlPanel.add(saveButton);
but the text is still aligned to the left. What have I done wrong please!!!
I am using the folling to seperate the JButtons, if this is at all affecting it:
controlPanel.add(Box.createHorizontalGlue());
controlPanel.add(Box.createRigidArea(new Dimension(13, 0)));
regards

Is your control panel being added to a border layout, and if so, what section (SOUTH?)

Similar Messages

  • Why tethering with USB cable doesn't work after IOS6.0 update?

    why tethering with USB cable doesn't work after IOS 6.0 update?

    Try updating the carrier settings, if that doesn't do it try following along with this Apple doc -> iOS: Troubleshooting Personal Hotspot

  • ITunes 10.4 full screen with Win7-64bit doesn't work correctly.

    iTunes 10.4 full screen with Win7-64 doesn't work correctly. I have the Windows taskbar on the left side of my screen. Maximized iTunes is panned to the left.

    Same issue here. When the Windows taskbar is position on the top of the screen and then the iTunes windows is maximised, it's position is as if the Windows taskbar is at the bottom of the screen so the top of the iTunes window sits under the taskbar.
    For those wanting a workaround, hold shift and right click the iTunes icon in the taskbar/quick launch bar and click restore, at least then you can adjust it to be full screen manually.
    System:
    Windows 7 Ultimate x64
    iTunes 10.4
    ATI 5750 video card

  • LAN with TCP/IP doesn't work

    Hello,
      I have a problem with my laptop IdeaPad S10e 4187-5PG: LAN with TCP/IP doesn't work, after I have updated all the drivers to the latest ones form the Lenovo site (except BIOS update). I tried to check if LAN worksby sending a ping to the IP address and that is OK, but when Isend a ping to the default gateway it failes. A ping to the DNS server also fails.Could you please help me because I tried everythinh and I can't getthe LAN to work.
    Thank you very much

    Perhaps you could describe you network in a little more detail.
    Is this a Workgroup home network or are you connected to a Domain server?
    If this is a workgroup are you connecting to the internet via a cable or DSL router?
    Do other computers on your network connect OK?
    Has your S10e ever worked properly on the network?
    Are you connecting via a wireless access point or LAN cable? 
    What do you Ping on and from where?
    Can you Ping OK on another networked computer?
    Open up a DOS Prompt (aka command prompt, DOS Box). and type IPCONFIG  /ALL <enter>. Do you get a compatible IP address and subnet mask? You should also get the gateway IP address.

  • In day 4, video # Creating "pages" with Flex states doesn't work

    i can't open video training http://www.adobe.com/devnet/flex/videotraining in day 4. it's name( Creating "pages" with Flex states ) doesn't work, it report error. supporter can look it and solve problem

    Hi,
         I'm also pacing the same issue. if click on the video in the Day 4 exercises. i don't know, what is the issue with that particular videos. and also pacing one more issue that design mode is not showing in my flash builder 4. if u have any ans plz help me out. PFA

  • Every Programme that it is opened with Adobe Reader doesn't work What Can I do ?

    Every Programme that it is opened with Adobe Reader doesn't work What Can I do ?

    More information please.
    Version of Reader? OS?  Can you open reader by double-clicking on its icon? Can you open reader by double-clicking on a pdf file? What programs are trying to open reader? Some programs might be restricting your ability to view pdf files using the Reader plug-in due to security concerns. If this is the case you need to find out how to enable the plug-in in the case of each application.

  • Comcast came to fix my internet. My AIRPORTWIFI now only works with desktop. it doesn't work with my IPhone or IPad. Why? What can I do?

    Comcast came to fix my internet. My AIRPORTWIFI now only works with desktop. it doesn't work with my IPhone or IPad. Why? What can I do?

    Hello lila54,
    It sounds like your Wi-Fi network is working if your desktop works with it, we just need to get the Wi-Fi on your iPhone and iPad connected to it.  I found a couple of resources to help with not being able to connect to Wi-Fi on an iOS device.
    I recommend following the steps in this tutorial first (the steps should work on the iPhone and iPad):
    Join a network
    http://www.apple.com/support/iphone/assistant/wifi/
    If you are still having trouble connecting to Wi-Fi, follow the steps in this article (you can skip any steps you have already taken):
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    Thank you for posting in the Apple Support Communities. 
    Best,
    Sheila M.

  • JPanel with Image just doesn't want to show

    Hello,
    i am trying to create a JPanel with a JLabel to which i assign an ImageIcon, but for some reason the JPanel seems not to appear in my JFrame.
    Here's the code: private void jbInit() throws Exception
        NumberListener numListener = new NumberListener();
        frame = new JFrame();
        frame.setTitle("Error Manager");
        frame.setLayout(new GridBagLayout());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        gbc.gridwidth = 1;
        gbc.gridheight = 1;
        gbc.weightx = 1;
        gbc.weighty = 1;
        gbc.gridx = 0;
        gbc.gridy = 0;
        numberList = new JList(numbers);
        numberList.addListSelectionListener(numListener);
        numberList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        JScrollPane listScroller = new JScrollPane(numberList);
        listScroller.setPreferredSize(new Dimension(250, 80));
        frame.getContentPane().add(listScroller, gbc);
        imgPanel = new JPanel();
        imgPanel.setSize(300, 250);
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Image img = toolkit.createImage("Somepic.png");
        imgPanel.add(new JLabel(new ImageIcon(img)));
        gbc.gridx = 1;
        gbc.gridy = 0;
        frame.getContentPane().add(imgPanel, gbc);
        frame.pack();
        frame.setVisible(true);
      }

    Sorry forgot to close the code tags...
    private void jbInit() throws Exception
        NumberListener numListener = new NumberListener();
        frame = new JFrame();
        frame.setTitle("Error Manager");
        frame.setLayout(new GridBagLayout());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        gbc.gridwidth = 1;
        gbc.gridheight = 1;
        gbc.weightx = 1;
        gbc.weighty = 1;
        gbc.gridx = 0;
        gbc.gridy = 0;
        numberList = new JList(numbers);
        numberList.addListSelectionListener(numListener);
        numberList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        JScrollPane listScroller = new JScrollPane(numberList);
        listScroller.setPreferredSize(new Dimension(250, 80));
        frame.getContentPane().add(listScroller, gbc);
        imgPanel = new JPanel();
        imgPanel.setSize(300, 250);
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Image img = toolkit.createImage("1_Alpinweiss_III.png");
        imgPanel.add(new JLabel(new ImageIcon(img)));
        gbc.gridx = 1;
        gbc.gridy = 0;
        frame.getContentPane().add(imgPanel, gbc);
        frame.pack();
        frame.setVisible(true);
      }

  • Standard Text with ' include' option doesn't work with order created by FM

    Hi ABAPers,
    Standard text with 'Include' Option does not work with all the Order created via the Function Module SD_ORDER_CREATE_WWW. Where as Order created via VA01 display the Standard text with 'Include'.
    On my analysis I found that, Order created via FM use  the '*' 'Comment' instead of ':/' 'Command' in the script editor. So the Standard text inserted was considered as a Text instead of command.
    Hence issuing print or print preview, the Script display the INCLUDE statement instead of the text.
    Can you please let me know the reason and the way to rectify it.
    Thanks & Regards
    N.Suresh Kumar

    Hi.
    Make that * command as /: and try in ur program..
    It works..
    Hope it helps...
    Cheers,
    Simha.

  • The applicatio​n uninstalle​r ,created with Labwindows CVI, doesn´t work after upgrading to 2010 version

    Hi,
    I have been working with Labwindows CVI 2009 with no problem but after upgrading to 2010 version I have the following problem:
    When i´m going to execute the unistaller, either from Windows Control Panel or directly from the uninst.exe icon, it doesn´t work. The PC thinks a few seconds and does nothing, and it happens with all the applications I build with Labwindows CVi 2010.
    Thanks,
    Asier
    Solved!
    Go to Solution.

    Hello -
    Are you installing these distributions on a non-English operating system?  If so, the first thing to try would be the workaround listed on this known issue. 
    The known issue only lists Italian OSs as the troublesome OS, but it could actually happen on many different non-English OSs. I will update the text accordingly the next time I update the known issues list.
    NickB
    National Instruments

  • Tabular form with Popuv LOV doesn't work with onchange event

    Hi all.
    I have a problem with tabular forms, Popuv LOVs and javascript.
    I have created one tabular form, I want to put a value in "my_field" field when a user selects a new value from other field called "my_list", I have this code:
    <script type="text/javascript">
    function putValue(pThis)
        var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
        html_GetElement('f06_'+vRow).value = '0000';
    </script>and this for Element Attributes:
    onchange="putValue(this);"Everything works well when I choose "Display as Text Field", but if I change this option to "Display as Popup KEY LOV" or "Popup LOV" it doesn't work, I mean "my_field" stays without any value.
    I'm using Oracle Application Express Release 4.0 and Oracle 11g
    Please help.
    Regards.

    Hi Peter.
    Thanks, yes, in fact the position of my column changes, but it doesn't work even with the correct element, I have made a lot of proves and it seems that APEX constructs POPUPS LOVS in a different way and that's why "onchange" does not work.
    With this thread: Re: onchange not work on popup lov for a field on collection I have a half solution, It works for existing rows, but it doesn't for added rows.
    I have solved this problem calling a function that set the onchange event to every row when "ADD ROW" button is pressed, now it works without problems.
    Regards.
    Oscar.

  • JPopupMenu with a submenu (doesn't work)

    I have a JPopupMenu that displays some info for me and I would like to add a submenu but it doesn't seem to work. I can successfully add the submenu but it doesn't "expand" when I mouse over the submen.
    JPopupMenu pm = new JPopupMenu();
    JMenu submenu = new JMenu("submenu");
    JMenuItem jmi = new JMenuItem(...);
    submenu.add(jmi);
    pm.add(submenu);The popup menu looks as it should and the only thing that is missing is the action that should expand the submenu when I mouse over (and clicking doesn't work either).
    Any ideas?

    I don't think it is my code because I have tried it with other JPopupMenu stuff and it never works. Here is a simple working example of it. If you can modify this code to work I will be a bielver...
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuItem;
    import javax.swing.JPanel;
    import javax.swing.JPopupMenu;
    public class PopUpMenuTest extends JPanel implements MouseListener, MouseMotionListener {
       private JPopupMenu jpm;
       private JFrame frame;
       public PopUpMenuTest() {
          super();
          addMouseListener(this);
          addMouseMotionListener(this);
          JFrame.setDefaultLookAndFeelDecorated(true);
          frame = new JFrame("Testing PopUpMenuTest");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setContentPane(this);
          frame.setSize(600, 400);
          frame.setVisible(true);
       public static void main(String[] args) {
          new PopUpMenuTest();
       public void mouseClicked(MouseEvent me) {
          System.out.println("Mouse clicked...");
          jpm = new JPopupMenu();
          jpm.setLightWeightPopupEnabled(false);
          jpm.add(new JMenuItem("Testing 1"));
          jpm.add(new JMenuItem("Testing 2"));
          jpm.addSeparator();
          JMenu submenu = new JMenu("A submenu");
          JMenuItem menuItem1 = new JMenuItem("An item in the submenu");
          submenu.add(menuItem1);
          JMenuItem menuItem2 = new JMenuItem("Another item");
          submenu.add(menuItem2);
          jpm.add(submenu);
          jpm.setVisible(true);
          jpm.setLocation(frame.getX()+me.getX(), frame.getY()+me.getY());
          jpm.setVisible(true);
       public void mouseMoved(MouseEvent arg0) {
          if (jpm != null) {
             jpm.setVisible(false);
             jpm = null;
       public void mouseEntered(MouseEvent arg0) {}
       public void mouseExited(MouseEvent arg0) {}
       public void mousePressed(MouseEvent arg0) {}
       public void mouseReleased(MouseEvent arg0) {}
       public void mouseDragged(MouseEvent arg0) {}
    }

  • Help with fuzzy search (doesn't work if change order of certain 2 letters)

    Hi,
    need some help with fuzzy search. It's pretty simple - we use fuzzy search on varchar2 columns that contain first name and last_name. The problem is that i don't really understand why it can't find name in some cases.
    Say i want to search for 'Taekpaul'. Then
    where CONTAINS(first_name,'fuzzy(TAEKPAUL)',1) > 0 - works
    where CONTAINS(first_name,'fuzzy(TAEKPALU)',1) > 0 - works (changed order of the 2 last letters)
    where CONTAINS(first_name,'fuzzy(TEAKPAUL)',1) > 0 - doesn't work, finds 'Tejpaul' that is completely unrelated (changed 2nd, 3rd order)
    How can i make it find 'Taekpaul' even if i search for TEAKPAUL? Is it related to index? Like Text index should be created with some different parameters?
    Thanks!
    Edited by: Maitreya2 on Mar 3, 2010 2:08 PM

    Thanks, adding '!' worked :)
    Do you know where i can read more about '!' and other special characters? I think i didn't see anything like that here: http://download.oracle.com/docs/cd/B14117_01/text.101/b10730/cqoper.htm#BABBJGFJ
    I also started using JARO_WINKLER_SIMILARITY function that is actually better i think for what i do. But it's very buggy - sometimes Oracle crashes and kills connection when you try to use it.
    Ahha, it's here: http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/cqspcl.htm
    So, ! is soundex. Whatever it means..
    Edited by: Maitreya2 on Mar 5, 2010 12:14 PM

  • App created with Flash CS6 doesn't work on iOS6

    Hi, I developed an iOS app with Flash CS6 and it works perfectly on iOS 5.1, but today I've upgraded my iPhone 4 to iOS 6 Beta for developers and my App doesn't work!! Apps developed with CS5.5 work well on iOS 6. How to fix it?! I tried to save in flash cs5.5 format and open it with CS5.5 to export it, but it doesn't export anything! Please give me a solution.

    update:
    - i'm still using cs5.5, but now have air3.3 overlayed
    - i changed the render mode in the app.xml file to "direct" instead of "gpu" and republished
    the app seems to display the graphics and dynamic text ok, but the stageVideos are not showing up.
    suggestions greatly appreciated, thanks...

  • HT1688 The friend brought to me from the USA iphone 4. I can't use it at all. It with our operators doesn't work. I very much ask you help me to solve a problem.

    The friend brought to me a gift from the USA, and it doesn't work year. Our operators don't understand it. Help me to unblock iphone4
    <Edited by Host>

    This has nothing to do with iPhones in the Enterprise.
    Sounds like your friend is a bit dumb and bought a carrier locked iPhone.  The only way to address this is to contact the carrier to whom the device is locked and find out their unlock policy.
    Oh, and stop being dumb yourself, posting IMEI, serial numbers, and email addresses on a public forum is just plain stupid.

Maybe you are looking for

  • 2lis_13_vdkon

    We are getting the following error when transporting to bi qlty. Further I find the info objects 0KAPPL, 0KINAK, 0CONDRECNO, 0kstat, 0KINAK  are missing in BI QAS system. Do we need to do activate KBETR, KNUMH, MWSK1 in R/3 as I find the standard dat

  • Table OF user defined type in c#

    Hello I am running C# using Oracle (PL/SQL, provider ODP.NET 11.1.0.6.20) and I have a procedure which at the moment returns a table of records. The code below demonstrates this. TYPE R_OutData_tab IS RECORD ( ... ); TYPE OutData_tab IS TABLE OF R_Ou

  • Transaction variant for Goods Issue going back to MB1A transaction screen

    Hello, I have created a transaction variant ZMB1A for Goods issue. When the goods issue transaction completed by using ZMB1A system again going back to the initial screen of MB1A. (Since it is the base of MB1A) Here the issue is everytime user had to

  • No AVCHD or any HD supported in CS 5.5 ?!

    Hello everybody, Today i installed the Adobe CD 5.5 master package, and when i started Premiere Pro i immediately noticed that there where no video presets supporting any kind of modern HD video such as AVCHD or XDCAM. So i made my own preset and tri

  • Premiere Elements 12 Files Won't Open Correctly in Windows 8 (64 bit)

    I haven't found a good format yet that will opening correctly in Windows 8. Some open with video only, others open with audio only, one opens video and audio but the image is elongated.  Nearly all of the file formats I tried that wouldn't open in Wi