I need to set the position of components on a page that contains a MenuBar,

I need to set the position of components on a page that contains a MenuBar, but MenuBar does not provide a getPreferred size method.
How can I get the MenuBar's size in AWT?
Thanks.

A menubar is not a general component that is added to a frame like any another. It is the specific responsibility of the setMenuBar/setJMenuBar methods to deal with this.

Similar Messages

  • How to set the position in SAP Script

    Hi Professionals,
    Can anyone tell me that How can I set the position of an bitmap Image (after inserting) in SAP Script ?
    by default position is in Left, I need to align it in center or somewhere else.
    Anybody knows, kindly reply!
    Thanks
    Devinder

    Hi,
    But Can we assign a window under another window. Because I want to insert a bmp picture on particular position.
    example:- there is a digital signature and wanted to insert upon a name.
    So, there is a text (which is customer name) and digital signature (in bmp picture format) upon it.
    Thanks
    Devinder

  • HT5622 I have just received a new iphone 5s and need to set the Apple ID with my work email.  I used my work email on my personal iphone 4s to set up an icloud account and it will not let me use my work email as the Apple ID on my new iphone. What do I do

    I have just received a new iphone 5s and need to set the Apple ID with my work email.  I used my work email on my personal iphone 4s to set up an icloud account and it will not let me use this email as the Apple ID on my new iphone.  As it is a work phone I need to use this email address as my Apple ID.  How do I do this?

    when you open the app store scroll down to the bottom it will display the apple id currently in use, change it to your normal apple id email

  • I need to get the position of scrollBar in JScrollPane

    I have two JTables pleaced in JScrollPanes. User can drag a cell from the first table and drop it on the second. I catch selected row nr in the first tible when dragging starts (using rowAtPoint(e.getPoint())) and when user releases mouse I need to calculate the position on the second table.
    Everything works great but if scrollBar in the first table is scrolled down I have a position of pointWhereMouseIsReleased == pointOnScreen+positionOfScrollBar
    All I need to get is the position of the scroll bar. I tried to use getValue() and so on but it didn't work.
    Any sugestions?
    Thank you,
    Przemek

    ((JViewport)table.getParent()).getViewPosition()will give you the position of the upper-left-hand corner of the viewport, in your JTable's coordinate system. Is that what you need?

  • How do you set the position of JScrollBars?

    Can anyone tell me how to set the positions of the JScrollBars in a JScrollPane so that it will show the area I want?
    please,
    Tommy

    Sorry i should of add the area I am talking about is a JPanel.

  • [svn:fx-4.x] 15171: In SpriteVisualElement.addingChild() need to set the nestLevel if ILayoutManagerClient or if IUITextField ( this was missing).

    Revision: 15171
    Revision: 15171
    Author:   [email protected]
    Date:     2010-03-31 10:21:49 -0700 (Wed, 31 Mar 2010)
    Log Message:
    In SpriteVisualElement.addingChild() need to set the nestLevel if ILayoutManagerClient or if IUITextField (this was missing).  Because of this styles weren't being set up in the text field
    QE notes:
    Doc notes: None
    Bugs: SDK-25987
    Reviewed By: Alex
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-25987
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as

    PS-Since I am missing some of my app. cd's, with
    Macintosh, are u able to just drag the app. folders
    and drop them on your new Mac and they are fully
    executable? In other words, are all Mac compatible
    programs self contained within their app. folder, and
    they can be simply dragged and dropped without having
    to be installed? Or is it that some apps can, and
    other mac apps have to be installed/restored from
    b.up software?
    Answer to this: it doesn't work. I tried it; my hard drive started having issues and I did "backups" in this way by dragging and dropping the applications to DVDs. By the time I bought an external HD a couple of days later, I couldn't use my laptop at all anymore, and after replacing the laptop's HD I tried to use the DVDs with copies of the applications. And they did NOT work. Ultimately I only lost a few things--.Mac's Freefall is the only thing that comes to mind right now--but reinstalling all the applications from original disks or from downloads (and tracking down the purchase receipts!) was very time-consuming. Fortunately the folks at the store just shrugged and put iLife back on the system for me, since I had no idea how to extract it off the disks that came with the computer.
    I think dragging and dropping did work with A FEW things, but only with basic stuff like Widgets.
    Hopefully if/ when disaster strikes again, the cloned drive I now have will make everything much easier. I'm using SuperDuper and it seems to work well enough.
    Oh, and I had all my photos/ music/ pictures/ documents/ calendars/ address books/ keychains/ mail backed up in a variety of ways: simply burnt to disk, or burnt to disk using .Mac's backup, or on iDisk. I got all that stuff back without difficulty. The applications were the hassle and so far as I can tell, the applications are what make cloning essential.

  • Need to set the account ID twice for CampaignManagementService?

    We're using GetCampaignsByAccountIdRequest to get the list of campaigns in an account.
    We found that we must set the account ID for the request to succeed:
    GetCampaignsByAccountIdRequest.setAccountId(AccountId);
    However, it seems it's also mandatory to set the account ID when crreating the java service stubs:
    BasicHttpBinding_ICampaignManagementServiceStub _service;
    CampaignManagementServiceLocator locator = new CampaignManagementServiceLocator();
    _namespace = locator.getServiceName().getNamespaceURI();
    _service = (BasicHttpBinding_ICampaignManagementServiceStub) locator.getBasicHttpBinding_ICampaignManagementService();
    _service.clearHeaders();
    _service.setHeader(_namespace, "CustomerAccountId", AccountId);
    Do we indeed need to set the AccountId twice as above?
    Thanks

    As a best practice you should always specify the identifier of the account being accessed in the CustomerAccountId header
    element. Some of the campaign management operations for example GetCampaignsByAccountId,
    require that you specify the account ID in the request message body, and most of them require that you specify the account ID in the CustomerAccountId header
    element.
    In a future version of the API we plan to make this more consistent, for example exclude the AccountId from the body, and only require CustomerAccountId in the header. 
    I hope this helps!

  • My dad died and I need to set the IPAD up as new.  How do I do that?

    My dad died last May and my mom gave me his iPad to use.  I need to set the iPad up as new but having problems.  I tried the online restore instructions using iTunes, but I can not read my dads apple password completely.  I have his apple ID but the password he wrote down is in pencil and fuzzy to read 2 letters correctly.  Does anyone know how to totally reset this?

    Brian, thank so much for this info.  I have been plugging along on the internet to find an answer to this puzzle before I had to go to the Apple store cuz I know it will cost some bucks to fix.  I am on a starving artists income, so god love the internet cuz I finally found the solution on this link.  I hope it can help others with the same problem like me.  Step #1- I had the latest version of itunes on my pc originally cuz I have an ipod, but I ended up having to uninstall and reinstall the latest version.  Than 2nd step I had to reset my host file too (do not ask me why, but follow this link's info for step 2)- thttp://support.microsoft.com/kb/972034
    Here is the rest of the instructions on this link to now follow for step #3.  http://www.macworld.co.uk/how-to/iosapps/how-hack-ipad-iphone-passcode-3504927/
    I appreciate everyone's support on this matter, my thanks!

  • SP2010 I need to set the include in search option switch on all document libraries to off across all site collections on the whole farm?

    SP2010 I need to set the include in search option switch on all document libraries to off across all site collections on the whole farm?
    Has anybody seen If this can be done programmatically any help would be gratefully welcomed thanks.

    i am not sure about the script, why not create crawl rule which will exclude the allitems.aspx from showing in the search results.
    Go to search service application, crawling section, click crawl rules to create a crawl rule to excludehttp://*allitems.aspx page.
    also check this:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/f431dd0e-871b-4f9e-990e-8f3b7ca932a4/crawl-rule-exclusion-sharepoint-2013
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Need help setting the exact size of my JSlider

    Hello everyone. I'm trying to build a small program to help people learn a about RGB colour values, and at the same time teach myself a bit more about Java. Things have been going fine so far until I came to setting my JSlider's size. The intention is to have three JSliders with a JPanel next to each. The I need the track of the slider to be exactly 256 pixels tall (one pixel per gradient value painted into the adjacent JPanel) plus whatever extra padding and spacing the Look And Feel dictates.
    I've got the height set to 256 pixels in the following code, but it makes the JSlider as a whole 256 pixels tall and so squishes the track. I've set the minor tick spacing to 2 so that if the track was actually 256 pixels tall, the ticks would alternate over each screen pixel. If you compile and run the code, you will notice that a few ticks appear next to each other without a one-pixel gap between them. I've also verified it by taking a screen capture, pasting it into the GIMP and then using the measure tool to check the size.
    I've tried searching through the API documentation to find ways of doing it, or to see if some ideas I've had so far were possible, but so far, I've not found anything particulairly satisfactory. I even tried to see if I could set the JSlider size to current JSlider size minus the track size, plus 256, but I couldn't find a way of getting the current size of the track.
    Can anyone help me out here? I'm rather stuck.

    Here's the code with all but the JSliders stripped out. Sorry about having to put it in a seperate post; the forum wouldn't allow it.
    Here's the code I have so far:
    package com.stephenphilbin.colourcoder;
    import java.awt.Color;
    import java.awt.Dimension;
    import javax.swing.GroupLayout;
    import javax.swing.GroupLayout.Alignment;
    import javax.swing.GroupLayout.ParallelGroup;
    import javax.swing.GroupLayout.SequentialGroup;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JSlider;
    import javax.swing.UIManager;
    import javax.swing.border.LineBorder;
    import javax.swing.border.TitledBorder;
    public class Colourcoder extends JFrame {
        private void initComponents() {
            String colourcoderTitle = "Colourcoder";
            String lightsPanelBorderText = "Lights";
            // Create the lights panel, set the borders and set up layout references
            JPanel lightsPanel = new JPanel();
            TitledBorder lightsPanelBorder = new TitledBorder(LineBorder.createGrayLineBorder(), lightsPanelBorderText);
            lightsPanel.setBorder(lightsPanelBorder);
            GroupLayout lightsPanelLayout = new GroupLayout(lightsPanel);
            lightsPanel.setLayout(lightsPanelLayout);
            // Initialize each light slider
            JSlider[] lightSliders = new JSlider[3];
            for (int i = 0; i < lightSliders.length; i++) {
                lightSliders[i] = new JSlider(JSlider.VERTICAL, 0, 255, 0);
                lightSliders.setPaintTrack(false);
    lightSliders[i].setMajorTickSpacing(16);
    lightSliders[i].setMinorTickSpacing(2);
    lightSliders[i].setPaintTicks(true);
    lightSliders[i].setSnapToTicks(true);
    // Loop through the light sliders and add them to the lights panel
    SequentialGroup horizontalLightGroup = lightsPanelLayout.createSequentialGroup();
    for (int i = 0; i < lightSliders.length; i++) {
    horizontalLightGroup.addGroup(lightsPanelLayout.createParallelGroup().addComponent(lightSliders[i]));
    SequentialGroup verticalLightGroup = lightsPanelLayout.createSequentialGroup();
    ParallelGroup parallelLightsGroup = lightsPanelLayout.createParallelGroup();
    verticalLightGroup.addGroup(parallelLightsGroup);
    for(int i = 0; i < lightSliders.length; i++) {
    parallelLightsGroup.addComponent(lightSliders[i], 256, 256, 256);
    lightsPanelLayout.setHorizontalGroup(horizontalLightGroup);
    lightsPanelLayout.setVerticalGroup(verticalLightGroup);
    // Final window/frame configuration
    setTitle(colourcoderTitle);
    setResizable(false);
    setLocationRelativeTo(null);
    GroupLayout frameLayout = new GroupLayout(getContentPane());
    getContentPane().setLayout(frameLayout);
    frameLayout.setAutoCreateContainerGaps(true);
    frameLayout.setHorizontalGroup(
    frameLayout.createParallelGroup(Alignment.LEADING)
    .addGroup(
    frameLayout.createSequentialGroup()
    .addComponent(lightsPanel))
    frameLayout.setVerticalGroup(
    frameLayout.createParallelGroup(Alignment.LEADING)
    .addGroup(
    frameLayout.createSequentialGroup()
    .addComponent(lightsPanel))
    pack();
    public Colourcoder() {
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    UIManager.put("swing.boldMetal", Boolean.FALSE);
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception ex) {
    System.exit(1);
    initComponents();
    * @param args the command line arguments
    public static void main(String[] args) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Colourcoder().setVisible(true);
    Edited by: S_Philbin on Sep 29, 2008 11:18 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • HT3180 setting date and time - my apple tv get stuck and says it needs to set the network date and time.  Does anyone know how to do this?

    My apple tv gets stuck and says it need to set the date and time on the network.  Does anyone know how to do this?

    I was able to get my Apple TV working again by downgrading the firmware following the instructions in this message:
    https://discussions.apple.com/message/20008613#20008613
    In case that message disappears, here's my translation:
    1. Connect your Apple TV to your computer via USB. Don't plug in the power cable.
    2. Download the older 5.0.2 firmware from Apple here:
    5.0.2 (Apple TV 2): AppleTV2,1_5.0.2_9B830_Restore.ipsw
    5.0.2 (Apple TV 3): AppleTV3,1_5.0.2_9B830_Restore.ipsw
    3. Open iTunes and select the Apple TV. Hold down the option key and press the restore button at the same time.
    4. In the dialog that opens select the firmware that you downloaded.
    5. The restore process will take a few minutes. Once it's done plug your Apple TV back into your TV. If the date and time message persists just press the menu button to skip it. This got mine working again.

  • I am writing a book and need to have the margins alternating left and right pages, so that there is sufficient margin for the binding. I have tried different inside and outside margins, the same inside and outside margins, facing pages, changing the maste

    I am writing a book and need to have the margins alternating left and right pages, so that there is sufficient margin for the binding. I have tried different inside and outside margins, the same inside and outside margins, facing pages, changing the master, and I cannot get the margins to alternate at print time. The larger margin is always on the left. Can anyone please help me on this, as I have spent hours and lots of ink.

    Set up as facing pages with a larger inside margin.

  • I am using numbers in the new iWork. Just bought it 10 days back. I am not able to figure out how to add serial umbers from 1 to 100( for example) also i need to freeze the top header like in windows so that we can browse down without the heading going of

    i am using numbers in the new iWork. Just bought it 10 days back. I am not able to figure out how to add serial umbers from 1 to 100( for example) also i need to freeze the top header like in windows so that we can browse down without the heading going off. Can some one help?

    Hi Jay,
    Be aware that "Freeze Header Rows" and "Freeze Header Columns" apply only to rows and columns that are Header rows or Header columns. You can have up to five Header rows, Five Header Columns (and five Footer rows) on a Numbers Table.
    "Header rows" is a special designation. Besides being able to be frozen, Header and Footer rows are not included in formulas referencing whole columns, making it possible to place formulas such as =SUM(B) at the top (or bottom) of column B without causing a self-reference error, These designated rows are also not included in sorts of the rows in a table.
    Regards,
    Barry

  • How do I set the Track Header in such a way that both the solo and mute are turned off?

    How do I set the Track Header in such a way that both the solo and mute are turned off?

    Another possible solution is to use a battery grip on your 70D and see if the dial on the grip will change the shutter speed.
    There are some discussions about this problem on some earlier models Canon DSLR. Check it out.
    http://www.dpreview.com/forums/thread/2638326

  • I entered my email in word with friends and it did not allow me to sign on. It said I needed to activate the email. How do I do that?

    I entered my email in word with friends and it did not allow me to sign on. It said I needed to activate the email. How do I do that?

    What does: "I entered my email in word with friends" mean?  Please explain better your problem and what you want to do.

Maybe you are looking for