JPanel containing JToolBars: how do I change its height?

Hello,
I have a JPanel containing several JToolBars. I add this Panel to the top of a GUI contentPane. The height of the JPanel seems to be too big - There seems to be about 4 pixels between the edge of the buttons, and the edge of the Panel, which goes into making the whole thing ugly.
I have set the margins of the buttons to new Insets(0, 0, 0, 0), so the button icons and text take minimal room - however, I don't know how to do similar for a JPanel.
I already have set a raised bevel border for this JPanel, so I cannot give it an empty border using new EmptyBorder(0, 0, 0, 0);
Please help a man going mad - Itll be funny.

By default a JPanel uses a FlowLayout. By default the FlowLayout uses a 5 pixel horizontal and vertical gap. Check out the FlowLayout API for info on how to change these values.

Similar Messages

  • My new iMac is seen as my old Mac Pro on the network because I used Migration Assistant. How do I change its name to iMac?

    I used Migration Assistant about 4 months ago to move everything across to my new iMac. Since then instead of being recognised as an iMac it's seen on the network and other places as my Mac Pro.
    How do I change its name to iMac?
    Cheers,
    David
    Mac OS X 10.6.8

    Hello David. Open System Preferences > Sharing. At the top you will see Computer Name and the old Mac Pro name. Highlight this and change to the preferred name.
    Sometimes you also need to use the Edit button under the name. But if you change the name in the first view and then press the Edit button, it should show the new name you just set.

  • In Office for Mac 2011 After creating a Button how do I change its shape without triggering its assigned macro?

    In Office for Mac 2011, after creating a button how do I change its shape without triggering its assigned macro?

    For questions about Microsoft's tools, it would be best to ask in the Microsoft Support Forums. They would likely have more experience than people here.

  • How do you change the height of a cell in the Bookmark tab?

    How do you change the height of a cell in the Bookmark tab?

    This does seem likely to be related to Mavericks:
    http://forums.adobe.com/message/5800367
    https://discussions.apple.com/thread/5491326
    https://discussions.apple.com/message/23548199#23548199
    So far there is apparently no solution, other than upgrading. (It does seem that upgrading your Reader will at least let you view the PDFs normally, even if editing them in 9 is still annoying.)

  • How can I change the height of the input box in a...

    How can I change the height of the  input box in a new version of Skype?
    Solved!
    Go to Solution.
    Attachments:
    Skype_input_box.png ‏4 KB

    lucasbgme wrote:
    I've tried 6.1.0.129
    6.1.0.129 version is disabled. All Skype versions older than 6.14 are now retired and can no longer be used. You can try to install the 6.21.0.104 version:
    http://download.skype.com/msi/SkypeSetup_6.21.0.104.msi

  • How can I change display height dynamically?

    Hi,
    I have defined layout style as "table-form". I want to control display height of a field depending on thich form user is in. In table, display height is "1" , but when user clicks edit and goes to form style, I need to change display height to "5".
    I belive it can be done using EL expression.
    Can anybody enlight me?
    Thanks

    It is easiest to make two separate items based on the same attribute. One item only displayed in table with height 1, the other item only displayed in form layout with height 5.
    Steven Davelaar,
    JHeadstart Team.

  • XML as target file - how can i change its character set?

    Hi all,
    i need to create my target as XML-file und to save all my information there, but with other character set (not with default). In other words i must have in XML-file in header
    <?xml version="1.0" encoding="ISO-8859-15"?>.
    Now i have
    <?xml version="1.0"?>.
    What can i do?
    Thanks in advance.

    I don't think Finder does this (I've tried).
    iTunes does though. Where you can set artwork or the "poster frame"...
    This may not be what you want but if it helps, I know 2 ways  do this is
    Open the video in QuicktimePlayer7 | View | Set Poster Frame (even then, you might need to save it as .mov (ie in a 'mov container').
    Drag the file into iTunes and set the artwork (as in http://www.dummies.com/how-to/content/adding-album-cover-art-or-images-in-itunes .html)
    From there, iTunes will use that frame as the "poster frame" ie the photo/frame that shows when you browse your videos. Which is what you want, but limited to iTunes.
    When I do either of these above, the frame I set does not show when exploring files in "Finder" (or in the other Explorer tool I use called "Pathfinder").
    So it maybe, that exactly what you want, is not possible.

  • How may I change the height of the menu bar to allow my large icons/buttons to maintain their size?

    I recently updated from FF28 to FF31. Totally different UI, I get that. I waited to update until I could psych myself to try something different. I have the Default Australis Theme and Noia Fox Theme, which is designed with larger icons/buttons for those with visual needs. On my screen at the moment I have the title bar, menu bar, tab bar, and url/addon bar with the "hamburger" menu to the right. I placed icons in the menu bar, kept the home icon on the addon bar, and then there are the default icons in the menu popup. When I enable the Noia Fox Theme, the icons look great on the url/addon bar, even in the menu popup; clear, large, easy to see. However, the icons in the menu bar (not the menu popup) are less than half their original/intended size. So I switch to default Australis Theme, restart, and same issue, though not quite as dramatic since Default theme is smaller to begin with.
    My thinking then is that there is a setting within the menu bar which resizes the icons/buttons to a small default size. Can this setting be changed to allow the icons to retain their original size (or close to it) and if so, how? I like the location of the menu bar on my screen, below the title bar, above the tab bar. Works nicely with the new The Fox Only Better addon which attaches to the tab bar and hides the url bar, a "new" feature for me and I'm liking it. I know I can get CTR with an additional bar, and I did try that. The issue then is that the additional bar appears below the tab bar and is not movable to above the tab bar and below the title bar.
    At the moment, I have just the two themes, security addons added and The Fox Only Better. I've not added other appearance addons yet so as to keep potential conflicts/issues to a minimum. I've not tinkered with internal FF default settings other than to say don't track me (I think that's all I did). So to the best of my limited understanding, I've kept changes and customizations to a minimum. And yes, per your educated guess feature for questions posted, I am running Win 8.1 and FF 31.
    I think I've offered enough detail so others can try to duplicate the issue. If not, let me know and I'll try to respond as soon as I can. Thanks so much for any help offered.
    ~ wkothlow

    You can double the height of the menu bar area using a custom style rule. I couldn't immediately find an icon that would take advantage of the space so I'm not sure this will solve the problem, but you could try it.
    The custom style rule could be as simple as:
    @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
    /* double height (from 2x to 4x the 13px base font size) */
    #toolbar-menubar{
    height:4em !important;
    (Result shown in the screen shot, using the preview feature of the Stylish extension.)
    You can apply custom style rules to Firefox's UI using either of these methods:
    (1) Create or edit a userChrome.css file. This article has more information: http://kb.mozillazine.org/UserChrome.css
    (2) Use the Stylish extension: https://addons.mozilla.org/firefox/addon/stylish/
    Since I don't have this theme to test myself, if this doesn't work well, you might contact the theme author using the theme's support thread, which is on an independent forum: http://forums.mozillazine.org/viewtopic.php?f=48&t=2230157

  • How do I change the height of my tabs so that they reach the top of the browster interface?

    Today for some reason I found that my tab sizes changed slightly so that moving my cursor to the top of the page misses the tab as there is now a bit of space above them. This applies to regular browser tabs as well as the Firefox tab, and is rather annoying. How do I get rid of this bit of space so the tabs reach to the top of the browser again?

    This issue may be caused by an add-on installed on Firefox.
    Please '''try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings and disables most add-ons (extensions and themes).
    ''(If you're using an added theme, switch to the Default theme.)''
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu by clicking on the '''Restart with Add-ons Disabled...''' menu item:<br>
    [[Image:FirefoxSafeMode|width=520]]<br><br>
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.
    Thank you.

  • How can I change text height without converting to outlines?

    I work in a sign company and often need to set up text at specific sizes. When text is CAPS it isn't so bad, but when in Title Case it can be a pain....
    For example, if I need 2" high letters, generally it would be relative to the capitalized version of the first letter of the word (regardless of ascenders and descenders).
    Some times I need to do several at a time, so changing them individually is very time consuming when I have to convert each word to outlines and then adjust each word for compensating for ascending and descending letters.
    I'm wondering if there is a quicker way to accomplish this without converting the curves?  Also, I notice that when I change the font size (in Character palette) to 2", for example, when outlining the text is actually smaller.

    signguy(there),
    You may:
    1) Tick Edit>Preferences>General>Use Preview Bounds;
    2) Select the Type and Effect>Path>Outline Object.
    That will reduce the Bounding Box to the actual bounds of the letters, and keep the Type editable.
    Remember to untick Edit>Preferences>General>Use Preview Bounds before you get a reverse issue.

  • How do I change a printer's IP address, !again! :(

    O Great, Knowledgeable and Kind printer gurus,
    I'm in a similar situation to Peter Minter's old archived thread at
    http://discussions.apple.com/thread.jspa?messageID=2188292?
    ... So I'm sorry to be the next confused person Sorry to be asking ask a question that has probably already been answered multiple times, in which case blush, and a pointer to the answer would be great.
    I have a Linksys Ethernet switch into which I've plugged
    1. RJ45 carrying signal to/from an Apple Airport Router's Ethernet LAN output plug (Router gets its input from my Cable Modem)
    2. RJ45 carrying signal to/from Mac Mini
    3. RJ45 carrying signal to/from Mac Al-PowerBook G4
    4. RJ45 carrying signal to/from HP LaserJet 5M
    1, 2, and 3 are networking just fine to one another and out to the Internet, and have been fine for months.
    It's the LaserJet 5M that I've just gotten that I can't figure out how to configure so's I can print to it.
    Via its test page output, the printer reports its current IP addr to be 0.0.0.0 , subnet mask NOT SPECIFIED, def gateway 0.0.0.0 , config by RARP/BOOTP
    Via its network status panel, the mini reports:
    IP: 10.0.1.2
    Subnet Mask: 255.255.255.0
    Router: 10.0.1.1
    Via its network status panel, the PowerBook G4 reports:
    IP: 10.0.1.4
    Subnet Mask: 255.255.255.0
    Router: 10.0.1.1
    In slot 4 of the Linksys switch, I used to have an HP Print Server that made a network printer out of an old HP LaserWriter 4ML's parallel port. Damned if I remember how I changed the HP Print Server's IP addr., but I did somehow!
    The newer HP LaserJet 5M has an RJ45 input so it's networkable directly, but I think I need to be able to reach into it (I think via Telnet from TERMINAL running in either of the two Macs) and change its IP addr to something in the local subnet. Maybe it "should" be 10.0.1.3.
    However, try as I might, I cannot open a TELNET connection to 0.0.0.0 or any machine:
    ==============
    DrDans-AL-PbG4:~ DrDan$ date
    Sat Jul 29 09:52:43 EDT 2006
    DrDans-AL-PbG4:~ DrDan$ telnet
    telnet> open 0.0.0.0
    Trying 0.0.0.0...
    telnet: connect to address 0.0.0.0: Connection refused
    telnet: Unable to connect to remote host
    telnet> open 10.0.1.2
    Trying 10.0.1.2...
    telnet: connect to address 10.0.1.2: Connection refused
    telnet: Unable to connect to remote host
    telnet> open 10.0.1.1
    Trying 10.0.1.1...
    telnet: connect to address 10.0.1.1: Connection refused
    telnet: Unable to connect to remote host
    telnet> quit
    DrDans-AL-PbG4:~ DrDan$ date
    Sat Jul 29 09:53:34 EDT 2006
    DrDans-AL-PbG4:~ DrDan$
    ==============
    So, from the AL-PbG4 (10.0.1.4) I can't OPEN connections to all the IP addresses I "should" be able to see. Hmm. I must be doing something wrong.
    Even if I could contact the HP printer, how would I change its IP addr, and what should I change it to? 10.0.1.3 or maybe 10.0.1.200 ?
    MacOSX 10.4.7, Printer Setup Utility Version 4.6(161.9)
    Given that the HP printer's directly on the LAN thru the switch -- should I use "HP Jet Direct - Socket" protocol, or Internet Printing Protocol (IPP) or Line Printer Daemon (LPD) protocol? Simply baldly getting in there and assigning the addresses 10.0.1.3 or 10.0.1.200 on HP Jet Direct - Socket" protocol doesn't seem to produce a working queue. I also select Print Using HP LaserJet 5M. No soap.
    Any hints? Should I d/l a better/higher functionality configuration tool from HP? I'm about Googled out on this, and what I think to be an exhaustive search in this HELP area doesn't give me the info I think I need. Wot am I doing wrong, pls? Any more info I can provide? Happy 2 do it. TIA for any cycles you can spare.

    I appreciate the feedback VERY much, Kappy, and at the beginning of my most recent (and successful!) hacking session, I thought that you were helping me "fail forward" ... but it all turned out OK, thanx to you!
    When I get the printout of the "MENU MAP" the HP MIO menu shows only
    CFG NETWORK = NO
    so with your welcome hint, I just found that if I go into the HP MIO menu and change NO to YES*, I can keep going... and I can even get to where I can change the TCP/IP addr!
    As (I believe) befits an important setting area like CFG NETWORK, setting it to YES* holds only for ONE application. When you come back from READY status, HP MIO's CFG NETWORK is set back to NO.
    But if I've just arrived and have set CFG NETWORK to YES* and keep going, I see choices like
    NOVELL = OFF*/ON (I left that at OFF*, no Novell hereabouts)
    DLC/LLC = OFF*/ON (not understanding what that is, I left it at OFF*)
    TCP/IP = ON*/OFF (I can set it ON* and it will "stick" from entry-from-READY to future entry-from-READY -- like I've turned it ON and it stays on)
    ETALK = ON/OFF*
    Encouragingly next, I see
    CONFIG TCP/IP = YES*/NO
    BOOTP* = YES/NO*
    Then I get to a place where I can enter
    TCP BYTE 1 = 0*
    and I can move that byte up until it reads
    TCP BYTE 1 = 10*
    and the same through the rest of the TCP BYTES:
    TCP BYTE 2 = 0*
    TCP BYTE 3 = 1*
    TCP BYTE 4 = 3*
    These settings persist from CONFIG TCP/IP to the next CONFIG TCP/IP session, so that's good...
    Next in the menu options, I see
    SM BYTE 1 = 0* which I assume means Subnet Mask, so I alter that to be the same as the other members of my LAN (correct me if these settings are wrong, please?)
    SM BYTE 1 = 255*
    SM BYTE 2 = 255*
    SM BYTE 3 = 255*
    SM BYTE 1 = 0*
    These settings persist from CONFIG TCP/IP to the next CONFIG TCP/IP session, so that's also good...
    Next the menu offers me
    LG BYTE 1 = 0*
    LG BYTE 2 = 0*
    LG BYTE 3 = 0*
    LG BYTE 4 = 0*
    I have no idea whatever what LG means, so I didn't change that. Same for the next choice:
    GW BYTE 1 = 0*
    GW BYTE 2 = 0*
    GW BYTE 3 = 0*
    GW BYTE 4 = 0*
    Finally, the CONFIG TCP/IP = YES* menu offers
    TIMEOUT = 90*
    and the possible values range from 0 through 3600. Having no idea whatever what this is, I left it alone.
    When my printer's TCP/IP addr was set at 10.0.1.3 I could PING it successfully. When I changed its addr to 10.0.1.200 I could no longer PING 10.0.1.3, but could successfully PING 10.0.1.200 .
    However, in neither case can I add a printer whose IP address is 10.0.1.200 or 10.0.1.3, whose queue-name I leave blank for the default queue, using IPP, and where I specify the HP Laserjet 5M device.
    Sooooh close I wondered what my dain bramage was...
    I next wondered whether it perchance had something to do with the LG or the GW 4-octet strings, which I could set to anything but which I've left 0.0.0.0 out of ignorance?
    But then I got a brainstorm -- it seems as if what is built into this printer is like the JetDirect I used previously -- so when I changed from IPP to JetDirect SOCKET protocol, everything worked!
    So a great big THANKS FOR THE CRUCIAL HINT!! goes to you, [B}Kappy!! :)
    ... might be nice to know what LG, GW, and TIMEOUT have to do with anything, but right now I'm a Happy Camper.
    ... and strangely enuf, the .PDF file I cite above has no occurrences of CFG, much less TCP. Foo upon all HP Documentation 'droids.

  • How can I change the name of a Sub Circuit in Multisim

    How can I change the name of a sub-circuit in MultiSim?  
    For example:
    I have a sub-circuit named "Output Channel 1" and its RefDes is SC1.  How do I change its name to 'Input Channel 1'?

    Hi,
    If what you want to change is the RefDes you can do it by right-clicking the sub-circuit and selecting properties. If what you want to change is the name, you can right-click the sub-circuit in the Design Toolbox.

  • Dynamically changing the height and width of Stage

    Hi,
              I would like to know how can I change the height and width of stage dynamically. I tried it with the following code:
                             Stage.height = 250;
                             Stage.width = 250;
    during the run time. Initially the Stage is at a height and width of 370 and 450 respectively. Also when I tried to trace the height and width of Stage after resizing the stage width and height, its showing the old value of width and height. That means the width and height not chnaging. Anybody have any idea about this.

    Hi Ross,
                I could understand something about the problem after making a research on this topic. We can't change the width and height of stage from actionscript itself, right? I will explain the way I am planning to do. I don't know whether its right or not. Anyway you just go through it. First the player need to be resized, according to the specified height and width. Then in the object tag, there are two fields named height and width. We should change these value according to the specified height and width of video controller, dynamically. Am I right? But I am confused with two properties of Stage such as: align and scaleMode. The code was actually developed my trainer. There, the scaleMode is set to "noScale" and no align property is used. My doubt is how should I set align and scaleMode properties of Stage. Hope you understood what I meant.
    Regards,
          Sreelash.S.

  • Changing the Height of Top Level Navigation

    How do I change the height of the Top Level Navigation?  I went into the framework page I am using, and then opened the Top Level Navigation iView, and changed the Fixed Height to "100" pixels while leaving the Height Type as "Fixed", but this had no affect.
    I am using just one level of TLN, and trying to increase the height of that one level so it is easier to see in the page.
    Thanks,
    Owen

    I have already downloaded the PAR file and customized it, and am using it in my custom portal framework.  Which part of the code do you recommend I modify?  There is the portalapp.xml file, which specifies the height as 45 pixels, but this is just the default size, which should be overridden by the value I specify in the iview, right?
    As far as the theme editor, that doesn't help me.  I have to increase the size of the top level navigation, not just change the font.
    Thanks,
    Owen

  • How can I change size rect in JPanel from another JPanel?

    I have code:
    import java.awt.*;
    import javax.swing.*;
    public class ProgramD {
    public static void main(String[] arg) {
    JFrame f=new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setSize(840,440);
    f.setLayout(null);
    PanelLeft p1=new PanelLeft();
    p1.setSize(400,400);
    p1.setLocation(0,0);
    f.add(p1);
    PanelRight p2=new PanelRight();
    p2.setSize(400,400);
    p2.setLocation(400,0);
    f.add(p2);
    f.setVisible(true);
    class PanelLeft extends JPanel {
    Shape shape1;
    PanelLeft() {
    shape1=new Rectangle(30,30,100,50);
    public void paintComponent(Graphics g) {
    Graphics2D g2=(Graphics2D) g;
    g2.setColor(Color.red);
    g2.fill(shape1);
    class PanelRight extends JPanel {
    PanelRight() {
    setBackground(Color.green);
    JTextField field1=new JTextField(4);
    JTextField field2=new JTextField(4);
    JButton b=new JButton("resize");
    add(field1);
    add(field2);
    add(b);
    }I would like to wrote width and height size of rect and click resize button, rect must change its size. I may add ActionListener, but I don't know what I may get size from PanelLeft and set size to PanelLeft. How may I solve this problem?

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ProgramDada{
      public static void main(String[] arg) {
        JFrame f=new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container con = f.getContentPane();
        con.setLayout(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        PanelLeft p1 = new PanelLeft();
        p1.setPreferredSize(new Dimension(400, 400));
        gbc.gridx = 0;
        gbc.gridy = 0;
        con.add(p1, gbc);
        PanelRight p2 = new PanelRight(p1);
        p2.setPreferredSize(new Dimension(400,400));
        gbc.gridx = 1;
        con.add(p2, gbc);
        f.pack();
        f.setVisible(true);
    class PanelLeft extends JPanel {
      int x, y, w, h;
      Shape shape1;
      PanelLeft() {
        x = 30;
        y = 30;
        w = 100;
        h = 50;
      public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2=(Graphics2D) g;
        shape1 = new Rectangle(x, y, w, h);
        g2.setColor(Color.red);
        g2.fill(shape1);
    class PanelRight extends JPanel implements ActionListener{
      PanelLeft pt;
      JTextField field1, field2;
      JButton b;
      PanelRight(PanelLeft p) {
        pt = p;
        setBackground(Color.green);
        field1 = new JTextField(4);
        field2 = new JTextField(4);
        b = new JButton("resize");
        add(field1);
        add(field2);
        add(b);
        b.addActionListener(this);
      public void actionPerformed(ActionEvent e){
        pt.w = Integer.parseInt(field1.getText());
        pt.h = Integer.parseInt(field2.getText());
        pt.repaint();
    }

Maybe you are looking for