Why my squares don't show up?

{color:#0000ff}Purpose:{color} Create squares with the order number on top.
{color:#0000ff}Problems:
{color}
1. Which one is better to create squares for minesweeper game, JButton or JLabel
2. Why I can't see those squares when I run this code?
{color:#0000ff}Codes:
{color}
package gameCodes;
import java.awt.*;*
import javax.swing.;
public class theGAME extends javax.swing.JFrame {
MinesweeperGame mainCode = new MinesweeperGame();
JFrame gameFrame = new JFrame ("Minesweeper Game");
public theGAME() {
initComponents();
Container cFrame = gameFrame.getContentPane();
addComponents(cFrame);
*/*** This method is called from within the constructor to
initialize the form.
WARNING: Do NOT modify this code. The content of this method is
always regenerated by the Form Editor.
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
pack();
}// </editor-fold>
{color:#cc99ff}*public void addComponents(Container cFrame)*
int squareNumber = 0;
for(int row=0; row<mainCode.getRows();row++)
for(int col=0; col<mainCode.getColumns(); col++)
for (int square = 0; square<mainCode.getRows()mainCode.getColumns(); square++)*
cFrame.setLayout(new GridLayout(mainCode.getRows(), mainCode.getColumns()));
JButton squareLabel = new JButton();
String noSquare = new Integer(square).toString();
squareLabel = new JButton(noSquare);
cFrame.add(squareLabel);
{color}*{color:#cc99ff}}*
*{color}*
** @param args the command line arguments*
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
{color:#cc99ff}new theGAME().setVisible(true);
{color}}
// Variables declaration - do not modify
// End of variables declaration
{color:#0000ff}THANK YOU!{color}

Djakarta wrote:
.... Which one is better to create squares for minesweeper game, JButton or JLabelIs that a question? Please add a question mark to all questions.
I'd go for JButton, since that already has much of the functionality needed.
2. Why I can't see those squares when I run this code?Your code was messed up partly by the forum formatting software. Since I could not be bothered trying to correct it and guess what you meant, I have not run the code.
When posting code or code snippets, XML/HTML or input/output, please use the code tags. The code tags help retain the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE Button.
Also, don't use colors to highlight sections of code, use a single or multi-line Java comment instead.

Similar Messages

  • Why flv videos don't show in version 5.3?

    I have bought Keynote 09 5,3 few days ago
    when I want to show an old presentation (Keynote old version) with flv videos, don't show the images. Only works audio!!! ??

    If these are "modern" .flv files that use H.264 video then you'll need a helper app like Perian to play them using QuickTime.

  • Why Audition CC don't show sample rate correctly?

    Hi
    Using Audition CC on Mac OS X with Mackie 1220, 12-channel premium analog mixer with integrated 24-bit/96kHz Onyx FireWire I/O (Quality is amazing!)
    Need to record on mono a horrible old tape recording with voice only to "hero"'s repairing audio and configure the best sample rate for recording.
    My preferences Audio Hardware on Audition are:
    Device Class: CoreAudio
    Default Input: Onyx Firewire (0025)
    Default Output:  Onyx Firewire (0025)
    Clock Source: Device
    I/O Buffer size 512 Samples
    Sample Rate: 96000 Hz
    Question 1: Expert said do not use more than 48000 Hz for recording voice only and use mono. Humans can't listen more than 20000 Hz... well... My recording on 96000 Hz is better than 48000 Hz and I'm not Superman... and can hear better difference with 96000 Hz recording. Don't know why.
    Question 2: Why after selecting Audio Hardware preferences to 96000 Hz after recording the File Panel said my track is 48000 Hz Mono 32 (Float)? My hardware can record at 96000 Hz and preferences is set correcty at that Bit Depth then WHY don't appears 96000Hz on File Panel after recording and instead appears 48000Hz?
    Question 3: Don't understand the differences of my 24-bit/96kHz Onyx FireWire I/O and 32 bit (Float) of Audition. If I record using 24 Bits (Maximum bit depth of my hardware) why appears 32 bit (Float)? My recording are 24 Bits or 32 Bits?
    Thanks :-)
    Tom

    CS6 has a serious issue with saving files correctly. The program is asuming that 48kHz is the maximum you will be using and in my case it saved a 96kHz recording with a 48kHz internal header. The file size is consistent with all my previous 24/96 recordings and it sounds just fine interpreted correctly - but played an octave low in frequency and tempo it really sucks unless you are a Blue Whale..
    I can play it "interpreted" as a 192kHz file just fine, and it now sounds 100% right, but I cannot save it correctly. I have yet to find out how to recover because when I use "convert Sample Type" it saves it with the same mistake - the wrong sample rate off by the same ratio again.
    It is a program flaw - so at this point you cannot record with sample rates higher than 48kHz in CS6 and depend on your file being OK.
    Tom the reason you can tell the difference between sample rates is that your hearing has two dimensions, frequency and timing, I sure hope you can't hear the bats at night but I expect that you can tell a good drummer from a bad drummer. In addition there is also the issue (dimension) of bit-depth - instrument decay and acoustic space occupies the time space between notes and if it is not sampled at the right time and place or rounded off to the nearest digital digit you have a problem.
    You all know that some humans have perfect pitch and others dont, this gives you some indication how much we each differ. Some people have even learned to use echolocation; the best know cases being blind people because they are not supposed to be able to find their way and know where they are. You can learn underlying concepts of this little discussed aspect of human hearing here and hit the university libraries for the rest. http://en.wikipedia.org/wiki/Human_echolocationhttp://
    SteveG's comment are only true in one of the three dimensions - frequency range. We all hear about the same for starters anyway.
    The second dimension, timing, is what provides spatial information. Coarse sampling effects this as well. My most recent experience was when transcribing some old casette tapes - when I experimented with FLAC and WMA lossless I found that they din NOT downsample well. Spatial information was significantly deminished be that aucoustic or studio work. Needless to say this surprised me because I was auming that I could drop the samplerate to 48kHz as soon I was done editing and save a lot of drive space. For now I made some excellent 48kHz/24 bit mp3s (320) because they altered the sound the least.
    Now you know some additional reasons why older guys like me who have lost the high end and a lot of decibel as well can still tell the difference:we have good sense of timing.
    Anyway - I need to learn how to edit my files to reset the sample frequency header - real fast. I just recorder a fabulous Madrigal group for 2 hours and my files are lost in the vortex.

  • Why all pictures don't show up in the drop zones?

    If I import, for example, 4 pictures in a theme that has three drop zones, only one or two pictures will show up when the loop plays and not in the order I have arranged them in the drop zones. Is there a way to sequence through all 4 pictures in each drop zone? Can for instance the loop be made longer than, in my case 0.28 min (5.0 "Memories" theme)?
    Thanks in advance for any suggestion.
    Frank Secco
    iMac G5   Mac OS X (10.4.5)   PowerMac G4

    Len,
    What you mean by "You can only load the same number of images into the number of drop zones and expect the theme to function properly."?
    Do you mean that I must have the same number of images, (for example 4) for each drop zone? Or,maybe, one image in drop zone 1, 2 images in drop zone 2 etc. for the drop zones to work properly?
    Frank

  • Why google maps don't show street of russian cities?

    I bought iPhone 4 in New York's Apple Store. Now, I live in Russia, and I can't use my Google maps, because it doesn't show street of my city! Please help me with this problem.

    I am jimfromtoronto and I have solved my own problem with my girlfriends computer. Simply within the menu bar she had checked the option to NOT show images. Once unchecked the problems just went away. Sorry for any inconvenience. Jim

  • Why reservation don't show decimal same as process order?

    When i create process order 001 its require Mat.A 0.95 ZET, the problem is when see reservation at MB26 its whow order 001 require 1 ZET, Why it's don't show 0.95 as process order require?
    Information: Base unit of Mat.A = SET, Unit of issue of Mat.A = ZET, alternative unit is 1 ZET = 1 SET.
    In T-code CUNI, decimal places rounding of unit SET = blank, decimal places rounding of unit ZET = 4.
    we wouldn't like to set decimal places rounding of unit SET = 4 because, they think its will impact to other material which use unit SET. for this reason we create new unit name "ZET"
    Can any senior has solution to make reservation to show decimal when BOM use unit ZET.
    or not have the way and back to set Mat.A to user unit SET in BOM and set decimal places rounding of unit SET = 4. but this way they concern about risk.

    Dear,
    Please try with the customizing settings in t.code " CUNI " ---> Units of Measurement
    1.) Take your Units of measure, go to details Screen
    2.)There u can see the entry Box with " Decimal Places". Type in u'r option and save.
    This might solve u'r Query.
    Regards,
    R.Brahmankar

  • Pictures don't show in camera roll

    Does anyone know why some pictures don't show up in the camera roll after I take a picture? The first time it happened I thought something was wrong and the picture didn't save. I looked in Photos and all the pictures I took were there but not all the pictures are in the camera roll. I haven't moved any photos. It seems to happen if I access the camera directly from the lock screen.

    When you access the camera roll from the lock screen, you can only see photos that you took while at the lock screen during that session only. The phone needs to be unlocked first in order to see all your camera roll photos.

  • The database migration report don't show all the erros at creation time

    Hello experts,
    I'm using omwb to migrate a sql server database, i realize that at creation of oracle model there are few stored procedures that was not created.. those object doesn't appear in the Errors_and_Warnings_report.htm but in the logs. My question is why the report don't show those objects?
    Another question: how to list the objects that the tool was unable to create in the oracle model?
    best regards

    HHerrera,
    Are the stored procedures that were not created, but were not in the in the Errors_and_Warnings report, visible in oracle, i.e. is the text available in Oracle? If so, it would be easy to compile all the objects in your schema and do a select to see which stored procedures were invalid.
    Regards,
    Turloch

  • Trace logs don't show the value of a procedure parameter.

    Hi;
    I am Facing a deadlock situation daily.
    I checked the alert.log and it look like this:
    ORA-00060: Deadlock detected. More info in file /oracle/admin/TEXP/udump/texp_ora_28966970.trc.Then i read the trace log, but it doesn´t show the value of procedure parameters.
    insert into estq_300 (data_movimento, codigo_transacao, nivel_estrutura, grupo_estrutura, subgrupo_estrutura,
    item_estrutura, quantidade, valor_movimento_unitario, valor_contabil_unitario, codigo_deposito, numero_lote,
    centro_custo, usuario_systextil, processo_systextil, tabela_origem, entrada_saida, numero_documento) VALUES
    (:v1, :v2, :v3, :v4, :v5, :v6, 1.00, :v7, :v8, :v9, 0, 0, :v10, :v11, 'ESTQ_300', 'E', :v12)
    End of information on OTHER waiting sessions.
    Current SQL statement for this session:
    UPDATE TB_Y SET QTDE_ESTOQUE_ATU = QTDE_ESTOQUE_ATU + :B11 , QTDE_ESTOQUE_MES =
    QTDE_ESTOQUE_MES + :B10 , DATA_ULT_ENTRADA = :B9 , DATA_ULT_SAIDA = :B8 , QTDE_ESTOQUE_F =
    QTDE_ESTOQUE_F + :B7 WHERE CDITEM_NIVEL99 = :B6 AND CDITEM_GRUPO = :B5 AND CDITEM_SUBGRUPO =
    :B4 AND CDITEM_ITEM = :B3 AND LOTE_ACOMP = :B2 AND DEPOSITO = :B1I sent the trace logs to the software supplier, but they want the parameter values.
    I'm reading the documentation and searching on the forum, but until now i can't find anything to help me. Is there any way to see the parameter value?
    This is a large database with a lot of users, so I can't trace all of them and wait the deadlock occurs.
    DATABASE:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    OS:
    AIX Version 6.1! Regards,

    sb92075,
    thanks for reply,
    This VW's helped a lot, but i have one doubt:
    Why some SQLs don´t show the value of it´s binds?
    The last captured is null too, why?
    Example:
    SELECT name, position, last_captured, value_string FROM v$sql_bind_capture WHERE sql_id LIKE '%ahfqand46px43%';
    NAME                           POSITION               LAST_CAPTURED             VALUE_STRING
    :V1                            1
    :V2                            2
    :V3                            3
    :V4                            4
    :V5                            5
    :V6                            6Thank's

  • Favicons don't show up in Internet Explorer.

    I'm just curious why the favicons don't show up in the favourites in Internet Explorer. I have my favourites on the toolbar in folders. When i use Google Chrome it's very easy to see which favourite i want because of the picture next to it. Most of the ones
    in Internet Explorer just have an E on them. It makes the browser look a bit tacky and it is the main reason i don't use Internet Explorer much. 
    They don't get erased in Chrome either when you delete the history.The ones that do work in chrome seem to disappear.

    Hi Rayintheuk,
    What is the Internet Explorer version you are using ? I will give an explanation for your issue based on the latest version Internet Explorer 11 .
    “I'm just curious why the favicons don't show up in the favourites in Internet Explorer.”
    Have you checked this setting ?Right click the white part of the bar and you will get this choice.
    “I have my favourites on the toolbar in folders. When i use Google Chrome it's very easy to see which favourite i want because of the picture next to it. Most of the ones in Internet Explorer
    just have an E on them”
    Right click the favorites in the favorites folder and you will get this :
    Then it will be shown in the favorites bar. Right click favorites ,you can choose the title widths of the favorites.
    “They don't get erased in Chrome either when you delete the history. The ones that do work in chrome seem to disappear”
    How did you erase the history ? Erasing the browsing history won`t affect the favorites folder of the Internet Explorer.
    Best regards

  • Apple TV 2 with the newest OS don't shows my films, bought on itunes. why?

    Apple TV 2 with the newest OS don't shows my films, bought on itunes. why?
    Can someone help me?

    Where are you located? Movies in the cloud is currently US only, on select titles, and on a trial basis.

  • Normally if anyone buys an apple product (mac) , it comes with a built-in-apps that should be considered ( built in ) , Then why when the mac faces a mistake or an error that forces it to format , these apps don't show up ? etc : iMovie , garageband

    normally if anyone buys an apple product with a specific model (mac) , it comes with a built-in-apps that should be considered ( built in ) , Then why when the mac faces a mistake or an error that forces it to format , these apps don't show up ? etc : iMovie , garageband ...
    considered it should be '' BUILT IN APPS '' ??
    So does it really make sense that i should buy these apps again after i already payed an extra amount of money in the first place to get a model that includes them ??
    after formatting my mac these apps should be there like its a whole new device that i opened !!!
    I hope anyone with any useful information can share his thoughts or help with further steps .

    Downloading past purchases from the App Store, iBookstore, and iTunes Store   

  • HT5622 Hello! I change my ID Apple and now when I try to make an update, Iphone show me my old ID and ask the password. Why is that? Why the phone don't see my new ID Apple?

    Hello! I change my ID Apple and now when I try to make an update, Iphone show me my old ID and ask the password. Why is that? Why the phone don't see my new ID Apple? I can not make any update because the old Apple ID don't work any more. I check and I have my new user all over in my phone. Help me please!

    All apps are tied to the Apple ID that downloaded them.
    They can not be transferred to a new Apple ID.
    You will have to use the Apple ID and password used to download them.
    If you do not wish to do so, erase them and download them under the new ID. This will wipe any data in the app and you will have to pay for them again.

  • Why is it that some missed calls don't show up in the missed calls list?

    Why is it that some missed calls don't show up in the Missed Calls list?

    Missed calls can only appear in your missed call list if your phone knows about them.  In other words, if the phone rang, but you did not answer.
    If a call was missed because your phone was turned off or not in a strong enough service area to receive the call, then it will not show up on your phone.

  • When people activate connection keys, they don't show up in the Admin users list. Why?

    I send people their key by e-mail. In most cases, when they click on it and it loads Contribute and they plug in the password, it will show up in the Admin listing of users. Other times, the same process is followed but they don't show up on any user list.  What can I do to get them listed?

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

Maybe you are looking for

  • Satellite Pro M30 Win 7 - webcam does not work on msn messenger

    Hi all I have a Satellite Pro M30 Modell Nr.: PSM35E and have just changed to Windows 7. But the Nvidia Card NVIDIA GeForceTM FX Go5200 Grafik mit 64 MB RAM does not work properly. I could find a driver from Vista and installed it, have Aero pics on

  • Unable to download Adobe Photoshop Elements 13, please help?

    Hi, I am unable to download Photoshop 13. I have bought it and have an activation code but the download just isn't happening. It starts to run, so I click 'Open/Run' when it appears on the bottom downloads bar, then nothing happens. Even when I go in

  • Display and Edit Patterns in XML Tags

    Using LiveCycle E2 V9. The display and or Edit Patterns are not reflected in the XML of a submitted form. While these display properly on the Adobe form on-screen, e.g. $150,000.00 when the fields are are submitted the XML tag as reflects 150000.0000

  • Number range not reflected in production

    Hello SAP greats                         While I am posting excise duty in j1ij it is taking the number range for the year 2008 and not the new one i have maintained in j1i9(j_1irg23d), please note that only a single plant is taking this previous num

  • Triggering attestation tasks with reosurce scope based on resource attr

    We have a requirement where the user has multiple accounts on a partcular resource (different type of accounts .. user account, service account, generic account etc. each of which is distinguished by a custom reosurce attribute). The default function