GridBagLayout I'm having a real hard time...

hello, here is my code, right now i'm only adding two components, because i want to make sure they look okay...unfortunately, my JPanel is taking up a huge amount of sapce, so that I can't even see it at all when I resize to the fullest....here is my code, i hope someone till help me!
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
public class MemoryGui extends JFrame  {
          private MemoryGame panel;
          private JList dataList;
public MemoryGui(String t){
     super(t);
     Container contentPane;
     contentPane = getContentPane();
     GridBagLayout layout = new GridBagLayout();
    GridBagConstraints layoutConstraints = new GridBagConstraints();
    getContentPane().setLayout(layout);
     panel = new MemoryGame(t);
            layoutConstraints.gridx = 0; layoutConstraints.gridy = 0;
          layoutConstraints.gridwidth = 1; layoutConstraints.gridheight = 3;
          layoutConstraints.fill = GridBagConstraints.NONE;
          layoutConstraints.insets = new Insets(0, 0, 0, 0);
          layoutConstraints.anchor = GridBagConstraints.NORTHWEST;
          layoutConstraints.weightx = 0; layoutConstraints.weighty = 0;
          layout.setConstraints(panel, layoutConstraints);
     contentPane.add(panel);
     String[] data = {"Timed - (2 min)", "Times - (10 min)", "No Time Limit"};
     dataList = new JList(data);
            layoutConstraints.gridx = 0; layoutConstraints.gridy = 0;
          layoutConstraints.gridwidth = 1; layoutConstraints.gridheight = 1;
          layoutConstraints.fill = GridBagConstraints.NONE;
          layoutConstraints.insets = new Insets(3, 0, 0, 0);
          layoutConstraints.anchor = GridBagConstraints.NORTHWEST;
          layoutConstraints.weightx = 0; layoutConstraints.weighty = 0;
          layout.setConstraints(dataList, layoutConstraints);
     contentPane.add(dataList);
     public static void main(String args[]) {
               JFrame frame = new MemoryGui("Memory Game");
               frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
               frame.setSize(650, 420);
               frame.setVisible(true);
}

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
public class MemoryGui extends JFrame  {
          private MemoryGame panel;
          private JList dataList;
public MemoryGui(String t){
     super(t);
     Container contentPane;
     contentPane = getContentPane();
     GridBagLayout layout = new GridBagLayout();
    GridBagConstraints layoutConstraints = new GridBagConstraints();
    getContentPane().setLayout(layout);
     panel = new MemoryGame(t);
     panel.setSize(450, 350);
            layoutConstraints.gridx = 0; layoutConstraints.gridy = 0;
          layoutConstraints.gridwidth = 1; layoutConstraints.gridheight = 3;
          //layoutConstraints.fill = GridBagConstraints.NONE;
          //layoutConstraints.insets = new Insets(0, 0, 20, 20);
          layoutConstraints.anchor = GridBagConstraints.CENTER;
          //layoutConstraints.weightx = 0; layoutConstraints.weighty = 0;
          layout.setConstraints(panel, layoutConstraints);
     contentPane.add(panel);
     /*String[] data = {"Timed - (2 min)", "Times - (10 min)", "No Time Limit"};
     dataList = new JList(data);
                layoutConstraints.gridx = 1; layoutConstraints.gridy = 1;
          layoutConstraints.gridwidth = 1; layoutConstraints.gridheight = 1;
          layoutConstraints.fill = GridBagConstraints.NONE;
          layoutConstraints.insets = new Insets(3, 1, 0, 0);
          layoutConstraints.anchor = GridBagConstraints.CENTER;
          layoutConstraints.weightx = 0; layoutConstraints.weighty = 0;
          layout.setConstraints(dataList, layoutConstraints);
     contentPane.add(dataList);*/
     /*style = new JLabel("Style:");
     layoutConstraints.gridx = 1; layoutConstraints.gridy = 0;
     layout.setConstraints(style, layoutConstraints);
     contentPane.add(style);*/
     public static void main(String args[]) {
               JFrame frame = new MemoryGui("Memory Game");
               frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
               frame.setSize(650, 420);
               frame.setVisible(true);
}setSize, does not work...and my Panel, was a lot smaller when i didn't use any Layout Manager, but I have to so that it will be resizable..

Similar Messages

  • I'm having a real hard time retrieving my emails from my old device

    I've switched to a 5s from a 4s I'm having a hard time reciveing my old and new emails and had to manually download all apps ,my contacts went through just fine I'm not reciveing any email? Can anybody help?

    Do you have the email accounts created on the new device. You will not get old email from the old devices on the new device, unless they are IMAP or Exchange accounts. Email downloaded to a device are on the local device and are not part of the backup or sync. If you are having issues getting new mail, that is a completely different issue.
    Not sure exactly what you did in the activation of this new device, but it sounds like you may have set it up as new and are trying to sync data back from iTunes? Is that correct?

  • My computer is having a real hard time with the up date

    My e mail stopped opening things. so I'm trying to find out what is wrong. I see an update is needed and I try but I get that error code. I have windows 8. (and hate it) what do I do?

    vnlgaitan wrote:
    My e mail stopped opening things.
    I have no idea what this means.
    You also write about an error code, but fail to provide it.

  • I have Adobe Premiere Element 7 installed and I use that as to editing my video's. I am having such a hard time trying to lightening a dark video. I tried everything but nothing is working. Please help

    I have Adobe Premiere Element 7 installed and I use that as to editing my video's. I am having such a hard time trying to lightening a dark video. I tried everything but nothing is working. Please help

    saloumehdaghighi
    Premiere Elements 7, on what computer operating system?
    In Premiere Elements 7, there are various effects for lightening a dark video. After applying one of these lighting effects, have you been editing these applied effects in Edit Effects/Properties Palette after you apply them?
    Video Effects
    Adjust - Brightness and Contrast, Auto Levels....
    Image Control  Panel that is a default Properties Palette panel along with Motion and Opacity....for Brightness, Contrast, Hue, and Saturation.
    ATR

  • I have a MacBook Air...I am having a very hard time loading some websites

    I am having a very hard time with some websites opening on my computer, but when I try to open them on my daughters computer(not an apple) it opens immediately

    Go step by step and test.
    1. Power cycle
         Power off the router. Unplug it from the wall. Wait a while.
         Plug it back to the wall. Power the router on. Wait until all the lights are lit properly.
         It will take a   while.
         Restart the computer.
         Start up in Safe Mode
         http://support.apple.com/kb/PH11212
    2 Empty Caches
        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        Develop menu will appear in the Safari menu bar.
        Click Develop and select "Empty Caches" from the dropdown.
        2. Quit Safari if open.
        Option click the "Go" menu in the Finder menu bar.
        Select "Library" and then "Caches".
        Look for the folder 'com.apple.Safari"
        Right click "com.apple.Safari" and select "Move to Trash"
        Relaunch Safari.
    3. Reset Safari.
        Click Safari in the menu bar.
        From the drop down select "Reset Safari".
          Click "Reset".
    4. Safari > Preferences > Privacy > Cookies and all other website data:
         Press “Remove All Website Data” button
    5. Turn off Extensions if any, and launch Safari.
        Safari > Preferences > Extensions

  • Having a very hard time dragging my sequence into an Encore timeline

    Hello, here is a screenshot, which I discuss further down this post:
    I'm having a heck of a time trying to import the "MASTER SATURDAY" sequence down into my timeline.  Dragging and dropping does not work, neither does right clicking on it and selecting the option "New/Timeline".
    When I do that, nothing happens.
    Does this have anything to do with where it says above that my DVD transcoding has "not been set"?
    Thanks,
    I'm stumped!
    My 629.mov file shown above drags and drops into the timeline just fine.
    Matt Dubuque

    PLEASE NOTE: I did try to set this all up so that I was dynamically linked with my project in Adobe Premiere Pro.  I don't know if I succeeded in that undertaking or if that is relevant.
    Here is a slightly expanded screen shot that could prove helpful:
    The sequence I am trying to import is listed at the top as a "Premiere Pro Sequence".
    Matt

  • Having A REALLY hard time installing itunes on my Window 7 laptop

    Alrite so this is like day 2 for trying to download itunes on my window 7 laptop!
    I click run and yes to everything and then when the whole itunes+quicktime pops up to download its gets all the way to the point where it says "Publishing product information," it seems to freeze close to the end of the bar and it takes several minutes and then
    "An error occurred during the installation of assembly 'Microsoft. VC80, version="8.0.50727.4053" ,type="win32" ,publicKeyToken= "1fc8b3b9a1e18e3b" ,process or Architecture="x86"" .Please refer to Help and Support for more information. HRESULT: 0x800736FD."  Pops up
    Please Help Me With This!
    Thank you!

    HRESULT: 0x800736FD
    These ones are typically caused by underlying problems on the PC that also often cause Windows Updates to fail to install. If we can fix the Windows Update trouble, we can usually get the iTunes trouble cleaned up en passant.
    Go into your Windows update and try to check for new updates. If updates install, stock up on the ones you're behind on, restarting the PC if requested to do so. After the restart, try installing iTunes again. Does it go through this time for you?
    If windows updates fail to install, go into your Update History and doubleclick the failures. What alphanumeric codes appear for you? Are they also 800736FD, or a different error code? If they're different, what codes are you getting in Windows Update?

  • Why can't I sign into my school cc Campus connect Ivy Tech I'm having a very hard time

    Keeps and default it will not let me sign in I have the right password but everytime my finances axxxxxx I try to go to link is siges of

    Hi Yjames3,
    Thank you for your question. I understand that you are having issues with signing into a website even though the username and password are correct. Please check the following:
    # Make sure that there are no incorrectly stored passwords if you remember passwords.
    # Please clear the cache and active logins by selecting Settings > Privacy > Clear private data
    # Try to connect to 3g and wifi and clear the private data before trying to login again.
    # another add on I would try is the Password manager at [addons.mozilla.org]
    I am not sure if this will help, but it can show the active connections in the browser:
    # There is a new tool you can check the network connections on Firefox for android go to [about:networking]

  • Having a real difficult time with Key Light

    I'm reading Mark Christiansen's After Effects CS4 Studio Techniques and Ive read the section on using Key Light 5 times and still cant get a key like his examples.  I'm trying to conquer two things that just are seeming impossible. One to retain the whisps of hair blowing in the wind and 2, to get rid of the green spill on the edges.  I've tried the 3 Pass Method, which he does not very cleary explain,and I cant get the edge matte that it is supposed to produce.  He leaves some of the important infomation written in the side notes, and other things are just plain confusing and he does not make clear reference to the examples on the DVd.
      Can anyone help me conquer this keying or at least point me in the direction so that I can learn this Step by CLEAR Step.
    Thanks.

    Hi there,
    The principle here is simple - it sounds as though the execution is what's tripping you up.
    First, let's get the principle straight. The whole reason to do this is to avoid using Keylight for anything but your edges in order to give them the subtlest possible threshold. This means breaking apart the image, and the most elementary way to do it is to start with three passes: a garbage matte to get rid of background noise/rig that doesn't cross the edges, a holdout matte to get rid of holes in the matte, and finally the edge pass. In more complicated shots it is necessary to break the image down further, for example doing one edge pass for hair and another for the body, etc.
    So you can start by just applying Keylight and creating your key.
    What I have you doing if that doesn't simply solve your key is to spread the resulting matte (using Simpler Choker with a negative value) so that it's well outside the edges to create the garbage matte. In the previous CS3 version of the book I instructed that you do this on a separate layer and use Stencil Alpha blending mode to apply the result to the layers below, one for the edge matte and one for the holdout matte. You can still do it that way if it's clearer.
    Otherwise, on a single layer the steps are
    1. apply Keylight, refine the matte and then leave the View menu set to Intermediate Result - that's important, it insures no color shift
    2. spread the matte with Simple Choker, set to a negative value (usually in the low double-digits)
    3. apply Keylight again to get your edge matte
    And after that, if there are holes in the matte, fix them by masking out a separate layer of the same source, below all of the others.
    I hope that helps.
    Mark Christiansen
    Author, After Effects Studio Techniques

  • I got an iTunes card and half the number is gone so I can't read it. Having a very hard time getting this fixed. Could someone please Email me on where n how I get this fixed. Thank you.

    Can someone please tell me how I can get find out the code on my iTunes card. Only half of the number is on my new card and I can't read it. Thank you.

    iTunes Store: Invalid, inactive, or illegible codes

  • Convert SSRS dropdown MDX query to INNER JOIN w/ NONEMPTY? Having hard time with this.

    I'm having an incredibly hard time with this, mostly because I'm very new with MDX.
    I created a simple report (with AdventureWorksDW) whose datasource is an SSAS cube. I select a datekey from the dropdown menu, and the report displays [Measures].[Order Quantity] for that day.
    The problem is that the dropdown displays every single value from the dimdate dimension. DimDate goes from 20050101 to 20201231, so the dropdown is very long.
    How can I alter the SSRS-generated MDX so that it does an INNER JOIN with Fact table and only the dates shown in the dropdown are the ones where there's data in the Fact table?
    Currently, the fact table only has 2 days of data (20141015, 20141016), which means that the dropdown should only display those two dates. I'm including the generated code MDX that populates the dropdown menu:
    WITH MEMBER [Measures].[ParameterCaption] AS
    [Dim Date].[Date Key].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS
    [Dim Date].[Date Key].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS
    [Dim Date].[Date Key].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption],
    [Measures].[ParameterValue], [Measures].[ParameterLevel]}
    ON COLUMNS , [Dim Date].[Date Key].ALLMEMBERS ON ROWS
    FROM [Adventure Works cube]
    Any help is appreciated.
    VM

    Hi vmhatup,
    you can get rid of blank data using nonempty function and get rid of negative values using filter function nonempty should be inside of filter so it applies first, otherwise it is too slow.
    Your statement could look like this
    WITH MEMBER [Measures].[ParameterCaption] AS
    [Dim Date].[Date Key].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS
    [Dim Date].[Date Key].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS
    [Dim Date].[Date Key].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption],
    [Measures].[ParameterValue], [Measures].[ParameterLevel]}
    ON COLUMNS
    , filter(
    nonempty([Dim Date].[Date Key].[Date Key],measures.measureName)
    ,measure.measurename >0
    ON ROWS
    FROM [Adventure Works cube]
    Jiri Neoral

  • Having a hard time OC'ing my Q6600 on the P7N SLI platinum!!

    Well, first of all, I am new here, so hello to you all guys! 
    I just purchased the p7n yesterday. I had a P6N SLi-V2 before and wasn't able to get over the 3.0 GHz (stable)! I thought the P7N will a much better overclocker but find myself having a really hard time get it over 3.0 GHz again!?
    Tried different versions of the bios (1.0,1.1,P04 and now 2.0) with no succes! Maybe anyone can help me out here and maybe share some bios setup? Will really appreciate it 
    My rig:
    Q6600 C2Q G0-stepping
    Tuniq Tower 120 CPU cooler
    P7N SLI Platinum
    1 x 2 GB TakeMS PC6400 DDR2 RAM
    2 x MSI NX8800GT OC 512MB
    1 x 200 GB + 1 x 250 GB HD
    Cooler Master Extreme Power 650w

    Quote from: troopertroop on 20-April-08, 22:22:09
    Man, this turns out  to be like a disaster :S:S I tried everything and now it won't even be stable @ 3.0 GHz with vcore 1.35, vram 2.2, fsb vtt 1.45, nb 1.4 and SB 1.5 (random reboots like crazy!). I have the intention to get some better OC's going from a p6n sli v2 to this board and it's even doing WORSE??????? The only weakpoint I can think about is my single stick 2GB TakeMS pc6400, but I never go over the stock speed of 800 MHz, so can that still be a bottleneck even at stock speed or even lower?
    Any help will be welcome...
    I found out the hard way.........if you are not running memory from the QVL  list with this mobo, you will have problems with it. I was running mine with team xtreem 3-3-3-8 microns and all I had was errors and corruption when I overclocked. I had to reformat and switch back to the performance bios and now running corsair dominators 3-4-3-9 and this is the first set that can run at 1200 mhz at 5-5-5-18 2T 2.2 v with the fsb at 1600. I 'm using an E8400. I have read that using non approved memory and this board will not overclock properly.  The only non approved memory that works in my system is geil ultra 8000's and these are the originals running D9GCT's. For stability you should try OCZ, Corsair, Mushkin, Buffalo, Kingston. I have also had problems with crucial ballistix as I've found most of there modules are in someway defective and or not compatible with MSI and have rma multiple sets. I have a previous post going from P6N FI to P7N and have listed all the  memory that I have tried on this board. OCZ and corsair work the best and geil can be used but will not oc past 1142 mhz with stability. I think after a few bios updates this board will be able to use more different types of memory without stability issues.

  • Still having a hard time with "search" driven new support site.

    I am still having a very hard time using this new support site. It is extremely confusing. Confusing is frustrating.
    I've looked at the Tutorials and User Tips. While the User Tips have often been helpful, overall I feel like the Tutorials especially is like getting a 5 page pamphlet on how to fly a jet plane. Top level overview. Not detailed enough.
    It shouldn't be so difficult - it's overly complicated to use this new site. It should be intuitive. It's not.
    My biggest issue is that this forum seems to REQUIRE a user to KNOW a priori what the user is looking for so that a SEARCH can be done. It seems to have no "browse" friendly features such as categories. And it's missing those ambient indicators such as the partially filled light blue dots on the old forum that showed in a nano second what threads were new, had updated posts, or were already read.
    The new site seems geared to take one down a rabbit hole with SEARCH too because it's constantly suggesting very OLD content that's not relevant.
    If you don't SEARCH and use just the right terms and know exactly how to set up some sidebar, toolbar, RSS feed, bookmark, email notice, etc etc etc. it's almost impossible to find things on purpose or accident or to know when a thread is updated.
    On the old forums, when I would post a question for myself I made a point to browse for threads where I might be able to help someone else. I have no idea how I could do that now.
    I now dread having to use the forums. I can't seem to help myself by finding existing answers in prior posts, help myself by keeping up with my own posts (since I can't tell what's new/updated) and I can't help others.
    It would be great if some kind of organization and structure could be put in place to help make this support site browse friendly.

    Hi, Gordon: I would guess we have a few hundred at the most. I have only entered about 20. Most of the entries are retail stores we sell wholesale to, and contractors we sell at contractor prices, but we also have a retail trade of customers and that is going to increase a lot when we open our new show room in a few months.
    My main concern is design and sales to the contractors and public, but I frequently get calls from stores asking about our inventory stock, shipments, etc. I'm new to this so I am just learning.

  • Having a hard time selecting an iWeb website host

    Now that MobileMe is gone and my website is down (yes, i missed the memo)... im researching hosts and having a hard time choosing.
    I would like unlimited storage as I have a lot of photos on my site.
    RAGE sounds good but seems pricey.
    I'm looking for a company familiar w/iWeb so that if there are any issues I have some assistance.
    I have searched the community and googled and keep getting just a few answers.  Nothing that really gives me a solid sense about the companies.  And it seems that RAGE does a lot of self promotion posing as customer which seems a bit sketchy.  I might be completely wrong but thats the sense Im getting from the videos and results I'm finding.
    Is there a site that gives solid reviews of the web hosting companies?
    Where have people here moved their iWeb website to?
    Thanks

    I have been using IX Webhosting for about 4 years with little to no problems "usually the problem was something I did" and they have been quick to solve any issue I have come across.
    As far as the unlimited is concerned they just do not set any pre-determined space or bandwidth.
    I have several websites hosted on my hosting plan ( I am currently using the expert plan ) and haven't ran into any space issues here is my bandwidth (traffic) & disk space usage.
    24/7 Customer Support by Phone, Chat, Ticket, Email
    Though, I haven't took advantage of the phone support the Chat, Ticket, & Email support has been real responsive.
    http://jeffnitschke.com/IXWebHosting.html
    http://jeffnitschke.com/wordpress/2012/06/how-do-i-move-my-mobileme-site-ix-web- hosting-blog/
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • Hi im using a mac book pro, im having hard time viewing vidoes on Facebook, it just happen few hours ago, how can i fix it? thanks

    hi im using a mac book pro, im having hard time viewing vidoes on Facebook, it just happen few hours ago, how can i fix it? thanks

    Hello Terrychelle,
    Thank you for using Apple Support Communities!
    If the issue is to do with Safari, then you may need to reset it.
    Safari 6 (OS X Mountain Lion): Reset Safari
    http://support.apple.com/kb/ph11914
    Regards,
    Sterling

Maybe you are looking for