I'm new and confused

I don't want to annoy anyone but if someone could help me I would appreciate it greatly. What I'm trying to do is bring up a window that is used to get the player names for a game and when they click the button that window goes away and another game window shows up. I decided to put the code for my class in here and hopefully someone can help point me in the right direction to get what I want to happen. Also any comments regarding better/more efficient coding is certainly welcome. Thanks.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.lang.Object.*;
import java.io.*;
import java.util.*;
public class wheelGUI extends JFrame implements ActionListener
public wheelGame newGame;
public JFrame gameWindow;
public JFrame playerSetupWindow;
//components for enter players frame
private JTextField enterName1 = new JTextField("Player 1",15);
private JTextField enterName2 = new JTextField("Player 2",15);
private JLabel P1 = new JLabel("Player 1:");
private JLabel P2 = new JLabel("Player 2:");
private JButton okButton = new JButton ("OK");
//components for game frame
private JMenuBar menuBar = new JMenuBar();
private JMenu fileMenu;
private JMenu helpMenu;
private JMenuItem createNewGame = new JMenuItem ("Start a New Game");
private JMenuItem viewHighScores = new JMenuItem ("View High Scores");
private JMenuItem quit = new JMenuItem ("Quit");
public JLabel player1;
public JLabel player2;
public JLabel scoreP1 = new JLabel("0");
public JLabel scoreP2 = new JLabel("0");
public JLabel clueCategory;
public JLabel currentValue = new JLabel ("Current Value:");
public JLabel generatedValue;
private JButton guessButton = new JButton ("Guess a Letter!");
private JTextField guessBox;
public String [] clueCategoryArray;
public String [] clueArray;
public JTextArea [] letterBoxes;
private JTextArea blackBox;
public String currentGuess;
public wheelGUI(wheelGame newGame)
this.newGame = newGame;
setDefaultCloseOperation(EXIT_ON_CLOSE);
playerSetupWindow = new JFrame("Enter Players");
Container contentPane = playerSetupWindow.getContentPane();
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
contentPane.setLayout(gridbag);
c.fill = GridBagConstraints.BOTH;
c.gridx = 0; c.gridy = 0; c.ipadx = 10; c.ipady = 10; c.insets = new Insets(0,10,3,10); //top,left,bottom,right
gridbag.setConstraints(P1 , c);
contentPane.add(P1);
c.gridx = 1; c.gridy = 0; c.ipadx = 10; c.ipady = 10;
gridbag.setConstraints(enterName1 , c);
contentPane.add(enterName1);
enterName1.setEditable(true);
c.gridx = 0; c.gridy = 1; c.ipadx = 10; c.ipady = 10; c.insets = new Insets(0,10,0,10);
gridbag.setConstraints(P2 , c);
contentPane.add(P2);
c.gridx = 1; c.gridy = 1; c.ipadx = 10; c.ipady = 10;
gridbag.setConstraints(enterName2 , c);
contentPane.add(enterName2);
enterName2.setEditable(true);
c.gridx = 0; c.gridy = 2; c.gridwidth = 2; c.insets = new Insets(5,40,0,40);
gridbag.setConstraints(okButton, c);
contentPane.add(okButton);
okButton.addActionListener(this);
playerSetupWindow.setVisible(true);
pack();
public void drawGameWindow ()
//draw main frame
gameWindow = new JFrame("Fortune Wheel");
gameWindow.setJMenuBar(menuBar);
     menuBar.add(fileMenu);
fileMenu.add(createNewGame);
fileMenu.add(viewHighScores);
fileMenu.add(quit);
menuBar.add(helpMenu);
createNewGame.addActionListener(this);
viewHighScores.addActionListener(this);
quit.addActionListener(this);
Container contentPane2 = gameWindow.getContentPane();
GridBagLayout gridbag2 = new GridBagLayout();
GridBagConstraints c2 = new GridBagConstraints();
contentPane2.setLayout(gridbag2);
c2.fill = GridBagConstraints.BOTH;
c2.gridx = 0; c2.gridy = 0; c2.ipadx = 5; c2.ipady = 5;
gridbag2.setConstraints(player1 , c2);
contentPane2.add(player1);
c2.gridx = 1; c2.gridy = 0; c2.ipadx = 5; c2.ipady = 5;
gridbag2.setConstraints(scoreP1 , c2);
contentPane2.add(scoreP1);
c2.gridx = 2; c2.gridy = 0; c2.ipadx = 5; c2.ipady = 5;
gridbag2.setConstraints(player2 , c2);
contentPane2.add(player2);
c2.gridx = 3; c2.gridy = 0; c2.ipadx = 5; c2.ipady = 5;
gridbag2.setConstraints(scoreP2 , c2);
contentPane2.add(scoreP2);
c2.gridx = 0; c2.gridy = 1; c2.gridwidth = 4;
gridbag2.setConstraints(clueCategory, c2);
contentPane2.add(clueCategory);
//Box to hold boxes creaeted for display
Box letterBoxesBox = new Box(BoxLayout.X_AXIS);
for(int i = 0 ; i < clueArray.length ; i++)
if(letterBoxes.getText() == " ")
//draw black rectangel
blackBox.setSize(1,1);
blackBox.setBackground(Color.black);
letterBoxesBox.add(blackBox);
letterBoxesBox.add(Box.createHorizontalStrut(5));
else
letterBoxesBox.add(letterBoxes[i]);
letterBoxesBox.add(Box.createHorizontalStrut(5));
c2.gridx = 0; c2.gridy = 2; c2.gridwidth = 4;
gridbag2.setConstraints(letterBoxesBox, c2);
contentPane2.add(letterBoxesBox);
c2.gridx = 0; c2.gridy = 3; c2.ipadx = 5;
gridbag2.setConstraints(currentValue, c2);
contentPane2.add(currentValue);
c2.gridx = 1; c2.gridy = 3; c2.ipadx = 5;
gridbag2.setConstraints(generatedValue, c2);
contentPane2.add(generatedValue);
guessBox.setSize(1,1);
c2.gridx = 0; c2.gridy = 4; c2.ipadx = 5; c2.ipady = 20; c2.anchor = GridBagConstraints.SOUTH;
gridbag2.setConstraints(guessBox, c2);
contentPane2.add(guessBox);
c2.gridx = 1; c2.gridy = 4; c2.ipadx = 5; c2.ipady = 20; c2.anchor = GridBagConstraints.SOUTH;
gridbag2.setConstraints(guessButton, c2);
contentPane2.add(guessButton);
guessButton.addActionListener(this);
gameWindow.setVisible(false);
pack();
public void actionPerformed (ActionEvent e)
Object source = e.getSource();
if(source == okButton)
player1.setText(enterName1.getText());
player2.setText(enterName2.getText());
clueCategory.setText(newGame.getClueCategory());
generatedValue.setText(newGame.getGeneratedValue());
for(int i = 0 ; i < newGame.getLengthOfLetterArray() ; i ++)
letterBoxes[i].setText(newGame.getLetters(i));
playerSetupWindow.setVisible(false);
drawGameWindow();
gameWindow.setVisible(true);
gameWindow.repaint();
else if(source == guessButton)
//deal with game action
currentGuess = guessBox.getText();
newGame.guessCheck(currentGuess);
repaint();
else if(source == this.createNewGame)
//new game selected from menu bar
newGame.clearGame();
else if(source == this.viewHighScores)
//Dialog Box with High Scores displayed
else if(source == this.quit)
System.exit(0);
public static void main(String[] args)
if (args.length != 1)
System.err.println("Usage: java WheelGUI <filename>");
System.exit(0);
wheelGame newGame = new wheelGame();
wheelGUI myGUI = new wheelGUI(newGame);
myGUI.show();
try{ newGame.readDataFromFile(args[0]); }
catch (IllegalArgumentException e) {
System.err.println(e.getMessage());
newGame.readDataFromFile(args[0]);

As I see it, it'd be best to have two classes, NameWindow and GameWindow. The window in which you enter your name would have a button, to which you can add an action listener. The code for that listener would be something like:public void actionPerformed (ActionEvent event) {
    String[] names = ...;
    hide ();
    new GameWindow (names);
}Some side remarks:
1. You don't have to import the java.lang package (by the way, there's not a java.lang.Object package, just a class named that way).
2. Use [code][/code] tags around your code next time: it will become easier to read.
3. If you're using a variable in just one method, don't declare it as a member variable (e.g. all your labels).
Kind regards,
Levi

Similar Messages

  • Hi - a new and confusing message when I try to connect my iphone with itunes on my laptop:  "this iphone cannot be used because the Apple Mobile Device Service is not started".  Any idea of my way out of this cul-de-sac??  Brian

    Hi, I'm getting a new and confusing message when I connect my Ipad/phone to my laptop:  "This iphone cannot be used because the Apple Mobile Device Service  is not started" ... any idea, anyone, how I get out of this cul-de-sac.  Brian

    try this http://melchoi.wordpress.com/tag/this-iphone-cannot-be-used-because-the-apple-mo bile-device-service-is-not-started/
    Hope it's gonna help

  • I'm new and confused about "connection" things

    I'm new to BlackBerry--I have an 8320 Curve, I'm a small business owner and I'm not connected to a BES. I use the BB Desktop Manager to synchronize with Outlook and to back up my BB and I've done pretty well on most things, but I still have a few things I'm confused about. In this forum, I'll ask my "confusion questions" concerning data options.
    I have a "pay as you go" data plan with AT&T, my provider, because there is virtually no cell reception at my home where I also work. (I'm not using my BB for email since I'm in front of my computer most of the time). I have a home network set up and I've incorporated a router that supports wireless. I've connected a netbook to the wireless network and used it to surf the Internet, so, I know my wireless connection works. I've also managed to create a wireless connection on my BB to this network and on the Home screen, it will display my wireless network's name when I'm here at home, so, I know the device is connected to my network.
    BUT, I don't think I'm actually using my home wireless network...I tried the other day by browsing the Internet and then AT&T told me I incurred data charges--which I thought I shouldn't have if I wasn't using their network. Either I'm wrong about assuming they won't charge me if I use my network or I have something set up incorrectly on my BB...can anyone provide some guidance?
    Next, I don't truly understand what BIS is...I searched through the KB and couldn't find anything that actually defines BIS...could somebody please explain what BIS is?
    Finally, can somebody please explain the difference between "mobile network" and "wi-fi"? It seems, if I turn off "mobile network" I have no connection at all, including wi-fi. Is that the way things should be? But, I can turn off wi-fi and still get a connection (if I go outside as far from my house as possible and face south <g>).
    Thanks...and now I'm off to the BB Desktop Manager forum to ask a few questions there!
    Solved!
    Go to Solution.

    Hi and Welcome to the forums!
    I can help you with one or two of your questions:
    ejm1 wrote:
    Next, I don't truly understand what BIS is...I searched through the KB and couldn't find anything that actually defines BIS...could somebody please explain what BIS is?
    BIS is Blackberry Internet Service...a service, hosted by your carrier, that provides a conduit between internet facing email systems (e.g., Yahoo, GMail, etc.) and your BB. Inside of BIS, you create conduits for each of your email providers that you desire to receive OTA email for on your BB. BIS will check your provider on a periodic basis (documented to be every 15 minutes) and only when there is something that needs to come to your BB does it generate any traffic over the carrier network with your BB. BIS is an add-service, only available to those who, from their carrier, contract for The Blackberry Data Plan (as it is usually called) -- a generic data plan is not usually adequate to have access to BIS.
    ejm1 wrote:
    Finally, can somebody please explain the difference between "mobile network" and "wi-fi"? It seems, if I turn off "mobile network" I have no connection at all, including wi-fi. Is that the way things should be? But, I can turn off wi-fi and still get a connection (if I go outside as far from my house as possible and face south <g>).
    Mobile Network is your carriers network...data and/or voice services provided OTA for your BB. WiFi is wireless networking (802.11a/b/g/n) through your home WAP, hotspots, etc. I don't know if turning off Mobile Networ should or should not affect your ability to continue to use WiFi...I would think they are separate, but I don't have a BB model with WiFi.
    I know nothing about the pay-as-you-go programs, but from all you describe, it seems that you may well be using your carrier network at times. You will need to find out (and there are others here who know) how to shut off your carrier network yet leave WiFi running so that you don't incurr the costs of surfing via the carrier network.
    Hope that helps a little!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • PLZ help me out i'm very new and confused to java

    Hi~
    I'm very new to java and I just brought a phone (Nokia 6670). It's capable of J2ME, as it says in the instrusction book, but I'm not so sure which Java to download. (THERE ARE SO MANY). Please help me out, I'm not sure what to do, since I'm putting games in Java.

    you want to develop your own game or just want to have some games on your new device?
    your phone has java runtime already, and that's all you need to run java games .. you can download them from several locations
    if you want to develop your own game then download Sun's J2ME Wireless Toolkit; also have a look at Nokia Developer's Suite and emulator for your device...

  • New and confused.. I need help please

    Good morning
    I just got my iphone 4S, and I'm struggling with the App Store billing.  I've downloaded whatsapp, and it asked me for billing info, so I've put my husband's credit card details on there.  Now, I need to update Facebook and it gave me a message that there was a problem with the previous billing info, but I don't have a credit card and would like to use my cellphone account (Cellc) to pay (IF I ever decide to actually buy something from there), but there is no such an option, only Visa, Amex and another credit card (most people I know uses their cellphone account).  Even when I log in to icloud or even here, it shows my husbands name and not mine.  How on earth do I change this?

    Well, never living in South Africa, I don't know how you pay for things, but in Europe, Japan, USA, Canada, and Australia, (and living in most of those places), credit cards are the normal way of doing things.
    At least here in the USA, you can use PayPal on iTunes. PayPal is in South Africa, so if it you can set that up, you can use it. If you set up a new credit card or PayPal then you can use another name.
    However, it's not all that relevant. I do not believe the name shows up anywhere, except when you buy things. Your apple ID is the only thing that matters, and you can make that whatever you want. If you put Facebook on your iPhone, you're going to be entering your Facebook ID, not anyone elses.
    Really, don't worry about any of this.

  • Can I return to former Firefox version--my desktop is in overload due to this new and confusing update...updated this morning...memory hog--besides other disconserting features not fully explained in update suggested page

    I have just updated my Mozilla Firefox at the pop-up warning that the version I was using was outdated. I am too confused by such aspects as high memory use (my computer will likely crash if this use continues--even when I am not asking questions of Mozilla Firefox. Can I reverse this choice to upgrade in order to restore all my settings and data?

    Hey,
    There are a lot of benefits to running the latest version of Firefox. You should take a look at [https://support.mozilla.org/en-US/kb/common-questions-after-upgrading-firefox-36 these common questions after upgrading] and [https://support.mozilla.org/en-US/kb/latest-firefox-issues the list of latest Firefox issues] for more information.
    If you still want to roll back to a previous version of Firefox, just take a look at the Knowledge Base article [[Installing a previous version of Firefox]].
    Hopefully this helps!

  • Help needed for new (and confused) BT Infinity cus...

    Hi,
    I upgraded to BT infinity from the normal broadband 3 days ago after being told on the phone my speeds would increase to 38mpbs on the download and the upload would rise up to 10mbps. I have waited the recommended 3 days stabilisation period and currently the download speed is around 17mbps and the upload is barely 1.5mbps. I have tried various methods to try and fix this but with no joy, any help or advice would be greatly, oh so greatly appreciated.
    Thanks

    Can you post your line stats from the HH5 please? These are in Troubleshooting/Helpdesk on the web interface at http://192.168.1.254
    Lines 1-13 will be enough
    If you found this post helpful, please click on the star on the left
    If not, I'll try again

  • My new events no longer show up in Events, since I upgraded to iPhoto 11 at the end of March. The number of events goes up, but they no longer show. The photos are in my photo place all right, but everything is getting every messy and confusing. Help!

    I upgraded to iPhoto 11 from iPhoto 08 at the end of March, 2012. Since then, although all my photos appear in the library,and the number of events tally goes up, no new events show up in Events. My iPhoto is getting very mess and confusing. I have checked preferences, and they are the same as what I always had (one event/day)

    Go into the Event mode and set the View ➙ Sort menu option to By Date, either ascending or descending, and look for the new events at the top or bottom of the list.
    You can view the last import in the Last Import section and then Control (right) click on one of the photos and select Show Event.  That will take you to the event where you can rename it at the top and then check to see where in the list it is placed.
    OT

  • New to Verizon and Confused by Options

    Hi,
    I am brand new to Verizon Wireless and LOVE the improved coverage and reception that I get over my old carrier.
    I know these terms are probably covered somewhere else but I haven't found a clear explanation of what some of the features are and if they involve extra charges.  I am wondering if someone can help. I have a family shared plan for voice and the standard data plan for my new Samsung Fascinate (which I love too ... even compared to my previous phone, the Nexus One.)
    V Cast
    Get It Now
    VZ Navigator
    Visual Voice Mail
    NFL Mobile
    3G Mobile Hotspot
    I am not sure if there are other services (either free or requiring an extra charge) that I am just unaware of yet or not.  Any help is appreciated.
    Thanks in advance,
    Bill in Woodstock, Georgia, USA

    Welcome to the forums board! I will be happy to provide you with information for each one of these features. These are applications that comes with the phone. If used there would be fees associated with each feature if it is used. 
     VZ Navigator provides visual and audible directions to a destination, locate businesses and other places in an area, get a map of a location, bookmark favorites and recent searches, and even share locations with others.There is a monthly subscription fee if activated for $9.99.
     NFL Mobile provides live video, audio, news and information throughout the NFL Season. Requires a $10 V Cast Video Subscription.
    Visual Voice Mail (VVM) is an application that allows subscribers to manage their voice mail directly from their device instead of dialing into the traditional voice mail system. Customers can view, listen to, delete, and manage, their messages regardless of delivery order.There is a $2.99 monthly fee if used.
    The 3G Mobile Hotspot application provides access for up to five Wi-Fi enabled devices including notebooks, netbooks, MP3 players, cameras, portable gaming systems, etc.All 3G smartphones with the mobile hotspot capability will be required to activate the $20/2GB if intended to use. 
    Media Center, formerly GIN (Media Center/GIN), is a virtual marketplace for applications. The Media Center marketplace is a solution that allows Verizon Wireless subscribers to customize and personalize their devices much like PC users customize their desktops.
    V CAST Video enables customers to: 
    Use on-demand video services. 
    Stay abreast of the latest news, sports, weather, and entertainment. 
    Get alerts when new clips matching customer preferences are available for viewing. 
    See video clips that are stored on a server. 
    Video clips are available for streaming and/or downloading. 
    The 3G Mobile Hotspot application provides access for up to five Wi-Fi enabled devices including notebooks, netbooks, MP3 players, cameras, portable gaming systems, etc. 
    You can also view the feature through your my verizon account. Click here https://myaccount.verizonwireless.com/accessmanager/public/controller?action=displayRegistration&goto=&lid=Register once you are signed into the online account if you will place your mouse over the account tab and click on plan. 

  • HT5622 How do I change the Apple id against a certain telephone number?  I have two iPhones and wish to use a different Apple id for each and confused as to how I do this?

    How do I change the Apple id against a certain telephone number?  I have two iPhones and wish to use a different Apple id for each and confused as to how I do this?

    Create a new Apple ID for the second phone. If you are setting the phones up as new phone enter the ID you want to use on each phone.
    If both phones are already signed in to one Apple ID then use the settings app to change Apple IDs on one phone.
    Settings > iTunes and App Store > tap on the Apple ID > sign out > sign in with alternate Apple ID.
    Note that if you have downloaded apps with the original Apple ID on the phone with the new Apple ID, those apps will still be associated with the old Apple ID and will require the old ID and password in order to update them.

  • I'm new and am having trouble trying to install plugins -through facebook to zoo world

    I am trying to get firefox to get into zoo world on facebook, that is my objective. the game said firefox needed adobe flashplayer and installed it. But game still said' missing plugins' I don't know what other plugins I need to install and the wizrd took me to a group -for adobe reader through firefox user instructions the first step "yellow bar with edit options' is not there?
    I am trying to get started and am lost and confused? Rita

    blacksheepfibers wrote:
    I updated my mac with  os x Lion so that I could accomplish moving my address book from the mac to my new IPad 3G. I also set up an icloud account for this purpose, but I *still* cannot figure out how to move my address book from one computer to the other. When I'm on my mac and try to use bluetooth to export the address book, I'm able to find my ipad but I soon get a message that it does not support the necessary services. I have no idea what's going on and would appreciate any advice. tks in advance, Sarah
    The address book syncs via iCloud, not Bluetooth or iTunes.
    You upgraded to Lion so you could use iCoud.
    On the computer. go to Apple menu > System prefs > iCloud.
    Sign into your iCloud account.
    Tick everything.
    This enalbes the se items syncing to iCloud.
    On the iPad, Settings > Mail, Contacts, Calendars.
    Create a new iCloud account.
    Sign in with the same AppleID as your computer.
    Settings > iCloud and turn everything on.
    BAM!
    That is all you need to do.
    Your contacts (and all other checked items checked) will sync between computer and iPad.
    No need to use iTunes

  • Swamped and confused about products

    Hi guys,
    I am new to Oracle middleware products. After looking at a few articles, I am swamped and confused about those products, WebCenter (WC), Content Server (CS), Universal Content Management (UCM).
    1. WC has a built-in content database, part of Oracle database. CS also stores contents into Oracle database. Then what are differences between two types of content storage? Can I build WebCenter with Content Server as the content storage?
    2. WebCenter provides management functions on content. So does UCM. Users could contribute, review and release contents to web via both. Then what are differences between two types of content management? What more does UMC provide than the built-in content management in WC.
    3. Content Server needs a third-party web server (port:80) to publish its content. WebCenter Suite seems use Oracle HTTP Server (port:7777) to render web pages. Is it possible to integrate those two on one web server? Why is Oracle HTTP Server using a weird port?
    4. JDeveloper has the built-in OC4J container. But how can JDeveloper access or interact with Content Server or WC content database? Site Studio can access Content Server directly but only provides very limited portlet or ajax components. If I want to store web pages, static or dynamic, into WC and/or CS, which tool should I use?
    Can anybody help me with them? Or please point me to the right direction. I really appreciate it.
    thanks,
    Chen

    Plug it in and use the Transfer Purchases function, either from the resulting dialog box or from the File menu. If you need to authorize the computer, choose it from the Store menu.
    (65603)

  • My iPod camera won't work. The shutter doesn't open at all. I backed up and restored my iPod but it didn't make it work. Now I'm so mad and confused. Please help.

    My iPod camera won't work. The shutter doesn't open at all. I backed up and restored my iPod but it didn't make it work. Now I'm so mad and confused. Please help.

    If you restored to factory settings/new iPod via iTunes (Not via Settings>General>Reset>Erase all Content and Setting) and still have the problem that indicates a hardware problem.
    Make an appointment at the Genius Bar of an Apple store..
    Apple Retail Store - Genius Bar

  • Just bought a Nikon d750 and confused about adobe LR4 and PS6 support for the RAW files. I have DNG 8.7 but wondering if LR and PS will import direct soon Thanks for any advice

    Just bought a Nikon d750 and confused about adobe LR4 and PS6 support for the RAW files. I have DNG 8.7 but wondering if LR and PS will import direct soon Thanks for any advice

    Support for the Nikon D750 was introduced in the latest version of LR 5.7 and ACR 8.7 on Novemder 18th 2014.
    Further updates to LR 4 were stopped when LR 5 was released on June 9th 2013. No further updates for bug fixes and new camera support.
    Nada, LR 4 will never support Nikon D750. The Nikon D750 was introduced into the market in September 2014 some 15 months after further development of LR 4 was discontinued.
    You can use the Adobe DNG program (free download for the package) to convert the Nef (raw) files from your Nikon D750 to the Adobe DNG format which will permit you to import those into LR 4. This is the crutch provided by Adobe to allow for the processing of raw files with outdated versions of LR and ACR.
    You can also update the ACR plugin for PS CS6 to version 8.7 which can also work with the raw files from the D750. For direct support in Lightroom you will need to upgrade (paid) to version 5.7.

  • IOS 4 Multitasking.  Messy and confusing.

    So, I am very confused about the multitasking with iOS4. Apple customer service tells me that the apps that are open in the multitasking bridge are not really running in the background eating my phone's battery/memory and that I should not worry about them.
    But what about the apps that are? How can you tell which apps are running and which are simply frozen?
    For example, imagine I open Pandora and turn down the volume, and then I open a calculator, a game, and a weather app. Now, looking at the bridge there is no way to tell that Pandora is running in the background and the other apps are not. Pandora gets pushed down the list with every app that I open and eventually it would get lost in the shuffle.

    To answer specific items in greater detail...
    Derek Doublin1 wrote:
    So, I am very confused about the multitasking with iOS4. Apple customer service tells me that the apps that are open in the multitasking bridge are not really running in the background eating my phone's battery/memory and that I should not worry about them.
    If the app doesn't use one of the 7 'multitasking' APIs then it will be frozen and not use background resources. Of the 7 APIs the one most likely to affect battery life is geolocation and anytime a geolocation app is active there will be a little arrow next to the battery indicator at the top right. The other six (in bold) don't use up a lot of battery compared to geolocation (items below from developer.apple.com):
    *Background audio* - Allows your app to play audio continuously. So customers can listen to your app while they surf the web, play games, and more.
    *Voice over IP* - Your VoIP apps can now be even better. Users can now receive VoIP calls and have conversations while using another app. Your users can even receive calls when their phones are locked in their pocket.
    _Background location_ - Navigation apps can now continue to guide users who are listening to their iPods, or using other apps. iOS 4 also provides a new and battery efficient way to monitor location when users move between cell towers. This is a great way for your social networking apps to keep track of users and their friends' locations.
    *Push notifications* - Receive alerts from your remote servers even when your app isn't running.
    *Local notifications* - Your app can now alert users of scheduled events and alarms in the background, no servers required.
    *Task finishing* - If your app is in mid-task when your customer leaves it, the app can now keep running to finish the task.
    *Fast app switching* - All developers should take advantage of this. This will allow users to leave your app and come right back to where they were when they left - no more having to reload the app.
    But what about the apps that are? How can you tell which apps are running and which are simply frozen?
    Normally you would find that in the programs documentation or look at the above 7 and see which it must use to work properly.
    For example, imagine I open Pandora and turn down the volume, and then I open a calculator, a game, and a weather app. Now, looking at the bridge there is no way to tell that Pandora is running in the background and the other apps are not. Pandora gets pushed down the list with every app that I open and eventually it would get lost in the shuffle.
    If Pandora is in the bar it is running and presenting audio unless you paused Pandora before turning the volume down. Would it still use the Audio API when paused and exited with the home key? I doubt it, but I really don't know.

Maybe you are looking for