GridBagLayout with JPanel, only 3 lines. Can you fix this?

GridBagLayout gridBagLayout = new GridBagLayout();
setLayout(gridBagLayout);
panel1.addComponent(modelLbl,0, 0, 0, 0);
this is all inside of a JPanel that is inside of a JTabbedPane. I want to use a GridBagLayout to arrange the components inside panel1 (which is a JPanel) but the compiler is telling me addComponent is undefined for JPanel.
Can you figure this out? How can I use a GridBagLayout in a JPanel?
If you cant use GridBagLayout is there anything similiar available for JPanel?

well as helpful as that was.....
i found the answer myself and it goes more like this...
panel1.setLayout(new GridBagLayout);
and then you have to create a GridBagConstraints object to enter the contraints, something like:
GridBagConstraints(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, Insets insets, int ipadx, int ipady) ;
and then you just use
panel1.add(component, GridBagConstraints object);

Similar Messages

  • When I rip a CD to iTunes. All goes well until I click on All Albums. If there are other artists named with the Title Artist they are shown as different albums so I end up with 16 albums containing 1 track instead of 1 Album with 16 tracks. Can I fix this

    When I rip a CD to iTunes all goes well until I click on All Albums. If there are other artists named as well as the Title Artist, I end up with what appears as 16
    Albums with 1 track instead of 1 Album with 16 tracks. Can I fix this ?

    Had a similar problem with two tracks from a cd being segregated in a separate list, but with the same album title and artwork as the other 19 tracks. I found that by double clicking the artist field next to the album icon you can then edit that info.  In your case it sounds as if you might want to erase the artist info altogether. Once you have done that, all the tracks magically group together, as they should have done in the first place. Oh there might be a dialog box first, asking if you really want to do this.
    Hope this helps.

  • I have no audio what so ever i have seen in one of the tables where it was deleted how can you fix this i tried everything i know

    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    i have been trying to get the audio to play for 3 days now i did see where it had been deleted this is a used comp i haven't had it long can you fix this i'm at my wits end
    == Firefox version
    ==
    3.6.3
    == Operating system
    ==
    Windows NT 5.0
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
    == Plugins installed
    ==
    *-Default Plug-in
    *Adobe Acrobat Plug-In Version 5.10 for Netscape
    *Java(TM) Platform SE binary
    *Next Generation Java Plug-in 1.6.0_20 for Mozilla browsers
    *Network Object Plugin
    *Windows Multimedia Services DRM Store Plug-In
    *Npdsplay dll

    Hello Virginia.
    You may be having a problem with some extension or plugin that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?

  • I have an ipad, when I watch a video the audio does not match up with the video, how can I fix this?

    I have an ipad and when I watch a video the audio does not match up with the video, how can I fix this?

    Hello there, graciecloyd.
    The following Knowledge Base article offers a few steps to try when an application is not functioning as expected:
    iOS: Understanding multitasking
    http://support.apple.com/kb/ht4211
    If an app doesn't respond to your input, or doesn't perform as expected, do the following, testing after each step:
    Check for app updates.
    Force the app to close.
    Restart your device.
    Update your iOS device.
    Learn more about troubleshooting apps.
    On Step 2, close all applicaitons that are open. On Step 3, if the restart doesn't help resolve the issue, you may also want to try the Reset step in that article as well.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Regarding iMessage, when i want to send text to a person in my contacts app, i've been getting a message saying the number has not been registered with iMessage.  How can one fix this problem?

    Regarding iMessage, when i want to send text to a person in my contacts app, i've been getting a message saying the number has not been registered with iMessage.  How can one fix this problem?  It works on the iPhone.

    It takes two to tango, maybe it's your recipient that has weak Internet/Cellular connections.

  • Hello.I can`t buy applications in my apple id.Then i buy in applications writes error contact support.Can you fix this problem?Thaks

    Hello.I can`t buy applications in my apple id.Then i buy in applications writes error contact support.Can you fix this problem?Thaks

    We are all itunes users just like you.
    You need to contact itunes support.
    http://www.apple.com/support/itunes/contact/

  • I just downloaded ios7 now i can only use the phone with the speaker, how can i fix this?

    I just downloaded ios7 now i can only use the phone with speaker, how can i fix this?

    x

  • I have a ipad mini and it says that it has perect wifi yet when i go into safari it says unable to connect with the server how can i fix this?

    I have a ipad mini and i have had it for less then a year, it says that i have perfect wifi up in the left corner where the wifi is always at  but when ever i go into the built in safari it says that it is unable to connect with the server. How can i fix this because with out it connecting to the server or internet it is kind of useless to me. I do have ios7 if that helps

    The wifi symbol only indicates the presence/signal strength of wifi. Not that you are connected.
    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are droping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    6. Potential Quick Fixes When Your iPad Won’t Connect to Your Wifi Network
    http://ipadinsight.com/ipad-tips-tricks/potential-quick-fixes-when-your-ipad-won t-connect-to-your-wifi-network/
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Fix WiFi Issue for iOS 7
    http://ipadnerds.com/fix-wifi-issue-ios-7/
    Fix WiFi Issue for iOS 7
    http://ipadnerds.com/fix-wifi-issue-ios-7/
    iOS 6 Wifi Problems/Fixes
    Wi-Fi Fix for iOS 6
    https://discussions.apple.com/thread/4823738?tstart=240
    How To: Workaround iPad Wi-Fi Issues
    http://www.theipadfan.com/workaround-ipad-wifi-issues/
    Another Fix For iOS 6 WiFi Problems
    http://tabletcrunch.com/2012/10/27/fix-ios-6-wifi-problems-ssid/
    Wifi Doesn't Connect After Waking From Sleep - Sometimes increasing screen brightness prevents the failure to reconnect after waking from sleep. According to Apple, “If brightness is at lowest level, increase it by moving the slider to the right and set auto brightness to off.”
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    How to Boost Your Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Boost-Your-Wi-Fi-Signal.h tm
    Troubleshooting a Weak Wi-Fi Signal
    http://ipad.about.com/od/iPad_Troubleshooting/a/Troubleshooting-A-Weak-Wi-Fi-Sig nal.htm
    How to Fix a Poor Wi-Fi Signal on Your iPad
    http://ipad.about.com/od/iPad_Troubleshooting/a/How-To-Fix-A-Poor-Wi-Fi-Signal-O n-Your-iPad.htm
    iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Connect iPad to Wi-Fi (with troubleshooting info)
    http://thehowto.wikidot.com/wifi-connect-ipad
    10 Ways to Boost Your Wireless Signal
    http://www.pcmag.com/article2/0,2817,2372811,00.asp
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    Some Wi-Fi losses may stem from a problematic interaction between Wi-Fi and cellular data connections. Numerous users have found that turning off Cellular Data in Settings gets their Wi-Fi working again.
    You may have many apps open which can possibly cause the slowdown and possibly the loss of wifi. In iOS 4-6 double tap your Home button & at the bottom of the screen you will see the icons of all open apps. Close those you are not using by pressing on an icon until all icons wiggle - then tap the minus sign. For iOS 7 users, there’s an easy way to see which apps are open in order to close them. By double-tapping the home button on your iPhone or iPad, the new multitasking feature in iOS 7 shows full page previews of all your open apps. Simply scroll horizontally to see all your apps, and close the apps with a simple flick towards the top of the screen.
    Wi-Fi or Bluetooth settings grayed out or dim
    http://support.apple.com/kb/TS1559
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Can you fix this script problem?

    Hi everyone
    I got this script
    for gen underline text to pdf
    the problem is it gen each page multi times if the page more then one place has underline text
    Can you fix it?
    //======================================================================
    var f = new Folder("~/Desktop/Revised_PDF put in here/"); 
    f.create();
    var doc = app.documents; 
    app.findTextPreferences = null; 
    app.findTextPreferences.underline = true; 
    for(var i=0;i<doc.length;i++) 
            var found = doc[i].findText(); 
            var _pages = []; 
            for(var j=0;j<found.length;j++) 
                    var txfms = found[j].texts[0].parentTextFrames; 
                    for(var k=0;k<txfms.length;k++) 
                            _pages.push(txfms[k].parentPage.name); 
            for(var j=0;j<_pages.length;j++) 
                    if(_pages[j] === _pages[j-1]) 
                            _pages.splice(j,1); 
            if(_pages.length != 0) 
                    app.pdfExportPreferences.pageRange = _pages.toString(); 
                    doc[i].exportFile(ExportFormat.PDF_TYPE, new File("~/Desktop/Revised_PDF put in here/" + doc[i].name.replace(/\.indd$/i,".pdf")), false);
            _pages = []; 
    app.findTextPreferences = null;
    alert("Done.");
    var f = Folder("~/Desktop/Revised_PDF put in here/" ); 
    f.execute(); 
    //======================================================================
    for specific details:
    Is that possible to write a script for export underline text to PDF?
    thanks
    Harvey

    > the problem is it gen each page multi times if the page more then one place has underline text
    Is this only when you have multiple unconnected text frames (each one containing underlined text) on the same page? Or possibly footnotes, tables, or anchored text?
    Chinna's script assumes all text is in a single threaded story: the findText command searchs one story at a time, from start to end (and across multiple pages). If it reaches the end of the story, it continues with the next one, even if it has to go back to the first page. And anchored objects, text in tables, and text in footnotes all count as "separate texts".
    Chinna's script already removes multiple pages:
    for(var j=0;j<_pages.length;j++)
      if(_pages[j] === _pages[j-1])
        _pages.splice(j,1);
    but it only works for a continuous story, because the "found" occurrences will be in the original page order, such as "1,2,2,3,5,5". This code removes successive doubles (see the Javascript documentation for a description of "splice"). As soon as you have separate stories (tables, 'notes, et cetera), you get a series such as "1,3,3,5,1,6" -- where "1,6" would be the occurrences in a separate story.
    The solution is simple: before removing the duplicates, sort the pages. As far as scripting goes, this is remarkably easy:
    _pages.sort();
    Please note that I just felt like answering your question this once. If you do what you did on most some of your other questions (ask for multiple versions for other formatting, have a different functionality, work on "selected documents" or "all in a folder" or "in a book file", or follow up with questions about totally unrelated scripts) I will probably not answer anymore.
    No offense meant, of course.

  • Facebook wont load but everything else does? can you fix this please?

    For the past 2 days now when ever i try to log onto facebook it will not load the page. Everything else works just fine. Why is this and how can i fix this annoying problem so i can contact folks overseas?

    Using Safari to access Facebook?
    If so...
    From your Safari menu bar click Safari > Preferences then select the Privacy tab.
    Click:   Remove All Website Data
    Then delete the cache.
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following
    ~/Library/Caches/com.apple.Safari/Cache.db
    Click Go then move the Cache.db file to the Trash.
    Quit and relaunch Safari to test.
    If nothing above helped, troubleshoot Safari extensions.
    From the Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that OFF, quit and relaunch Safari to test.
    If that helped, turn one extension on then quit and relaunch Safari to test until you find the incompatible extension then click uninstall.

  • Recent upgrades prevent loging into Citibank, can you fix this?

    Attempts to login to Citibank.com give "We've had a problem processing your request." This error appears to be from FIrefox, not Citibank, as they have no record of attempted logins. I have cleared citibank cookies and that doesn't help.

    Maybe its the new mixed content blocker?
    Starting in Firefox 23, if a secure page includes certain types of insecure content, Firefox blocks the insecure content and a shield icon will appear in the address bar. See this article for more information about the new mixed content blocker: [[How does content that isn't secure affect my safety?]]
    To temporarily allow the mixed content to be displayed:
    *Click the '''shield icon''' [[Image:Mixed Content Shield]] in the address bar and choose '''Disable Protection on This Page''' from the dropdown menu.
    [[Image:Fx23MixedContentBlocker]]
    To allow insecure content to be displayed in all secure pages, enter '''about:config''' in the address bar and double-click on this preference, to toggle it from true to false:
    '''security.mixed_content.block_active_content'''
    You can also use this add-on instead, to toggle the preference:
    *[https://addons.mozilla.org/firefox/addon/toggle-mixed-active-content/ Toggle Mixed active content] add-on
    You may want to do this only for the current session, then reset the preference back to "true" and check back with the site to see whether it's been fixed, since this is a global setting that exposes you on all sites, not just the one you care about.
    Let us know if this helps!

  • 4s bricked after trying new update, stuck with black screen with apple logo how can i fix this

    Update bricked my 4s
    phone , stuck with black screen with apple logo .. 
    how can I fix this

    Greetings r1042,
    Welcome to the Apple Support Communities!
    I understand that your iPhone is not booting up past the Apple logo. In this situation, I would recommend working through the troubleshooting steps located in the attached article.
    If your iPhone, iPad, or iPod touch doesn't respond or doesn't turn on - Apple Support
    If your device gets stuck during startup
    When starting up, you might see the Apple logo or a red or blue screen for a long time, or your device might restart again. Try these steps:
    Make sure that you have iTunes 12 or later on your computer.
    Put your device in recovery mode.
    When you get the option to restore or update, select Update. This will reinstall iOS without erasing your data.
    Have a great day,
    Joe

  • In Windows Live Hotmail, the tabs/elements constantly reload. Can you fix this?

    In Windows Live Hotmail,
    The buttons/elements on the side of the inbox page constantly reload, while I'm reading a message and when I try to go back to inbox, it automatically switches back to the message I was reading before.
    Please fix this!

    See comments 17,44,63,71:<br />
    [https://bugzilla.mozilla.org/show_bug.cgi?id=627729 Bug 627729] - Hotmail web page continually reloads every second<br />
    ''(please do not comment in bug reports; you can vote instead)''

  • Bookmarks toolbar disappears, do view, toolbars, turn off then back on it works. Can you fix this permanently??????

    Randomly occurs, sometimes multiple times daily, sometime goes for week or two without occuring. Switching to Chrome might fix this?

    Does this happen in the same window, or is the toolbar missing in new windows, or both?
    You mention that it may only happen every couple of weeks, suggesting this pre-dates Firefox 36. How long would you say it has been happening?
    Do you have any add-ons or custom style rules that affect the layout of the toolbar area? Examples would include Classic Theme Restorer, full themes, or a userChrome.css file.

  • Can you fix this in the Icelandic version: "Hlaða niðu Firefox" it should be spelled "Hlaða niður Firefox"

    When I download the Icelandic version of Firefox it says: "Downloading Firefox" or "Hlaða niðu Firefox". It is spelled wrong in Icelandic and should be spelled "Hlaða niður Firefox". Can you please fix it?

    hi gaggi96, thank you for bringing this up - i've forwarded your information to the icelandic translation team ([https://bugzilla.mozilla.org/show_bug.cgi?id=1133329 bug# 1133329]).

Maybe you are looking for

  • "Wireless Radio is not Functioning" when Diagnostic Tool is run

    I recently unplugged my HP Photosmart Premium C309a and relocated it to a new shelf beside my main computer.  Wireless networking worked just fine before the move, and now it won't detect any networks to connect to.  I've run the Wireless Network Tes

  • Form not working in mobile devices

    Hi, i have created one form using adobe pro & it's work well in my pc. my form should work in the Adobe Reader app on iPads and Android tablets also. Unfortunately, it's crashes the app on both devices.my form has text fields & combo boxes. here i ha

  • Use cookie on client to save session authentication...how?

    I am calling a web service that has a login method. It sets a session id in a cookie. Every subsequent call fails and says I'm not logged in. How do I save their cookie or session ID such that the server thinks I'm logged in? Here's the client code (

  • Send email & print PO simultaneously in me22n

    Hi all, When I select output NEU and select medium PRINT OUTPUT I can print my purchase order on my local printer. When I select medium EXTERNAL SEND I send purchasing document by e-mail. This works fine but can I print and send purchase order at the

  • Where to place    text file in  Jdeveloper9irc  to read from Java program

    For ex. package mypackage; import java.io.*; public class ReadData public ReadData() public static void main(String[] args) new ReadData(); try{ File fin = new File("test.txt"); if (fin.canRead()) System.out.println("Can read file"); I am geting a er