Input player name etc

Hello,
I am new to Java, so may question may sound silly, but anyway, I need advice.
I've got class Board:
public class Board extends JPanel implements RunnableI've got board background image, and all other game graphics in Paint method.
I'm using game loop, where I call repaint() method. Also I've got KeyListener and MouseListener in this class. Everything works perfectly at this stage. But now I need to create input of player names and other player info (human/nonhuman, credits, etc.). And my question is how to organize this data input?
That is, I need to create game stage lets say 'DataInput' and during this stage to show input fields to player and to use entered data. What is the best strategy to do that? Should I paint rectangles, listen to keyboard, and print some entered text in that rectangles and accordingly emulate radiobuttons? Or maybe there is some ready, better solution?
Waiting for any advice,
Best regards,
dbpr

dbprog wrote:
Thanks for reply. Yes, of course I could use it. But how to switch between JPanels?There are many ways. I can't tell you what you want to do though. Some things to consider: CardLayout , JTabbedPane , or like I already said, using another JFrame or JDialog .

Similar Messages

  • My music is on a nas loaded by Windows Media Player in WAV. When I import into Itunes only the songs appear no album name etc.

    My music is on a nas. Loaded using windows media player in WAV.
    When I import into Itunes only the record apears, no Album name etc
    How can can I see all the details

    Information is often stored as tags embedded in the file.  WAV does not support tagging. I don't know how WMP works but iTunes keeps its own database about media.  For many audio formats, track information will be stored both in iTunes' database and in the file itself as tags.  With formats such as mp3 most tags (not all) will 'travel' with the file when copied.  This does not happen with WAV where the information is only stored in the player application's database.

  • How to input my name in my photos?

    How to input my name in my photos using IPhoto?

    There is no need to input your name to iPhoto and no way to - it does not use your name for any reason
    You can add accounts like email, facebook, etc in the iPhoto preferences ==> accounts - click on the + sign
    LN

  • Burn with song names etc...

    Im gonna burn a few songs to a CD-RW and was just checking which burning method i need to set in iTunes to burn with song names, album names etc.
    Also, can i burn to a DVD-RW with these settings
    NB: the CD will be imported into an iTunes Libary, and not really played in a CD player.
    *nathan

    You want to burn your disc as a Data disc. This will maintain all the ID3 tag information you have entered.
    1. Create a Playlist with the content you want to burn to disc.
    2. Open iTunes Prefs > Advanced >Burning (Prefs > Burning in pre-iTunes 5).
    3. Select the Data CD or DVD option and click OK.
    4. Highlight the Playlist and click the Burn button in the upper right corner of the window.

  • Song titles, artitist names, etc., do not show up on burned CD

    Can someone please tell me why when I burn a playlist onto a CD the song information does not transfer? It doesn't have song titles, artist names, etc.
    Thanks!

    Original CDs from the store do not have track titles either.
    iTunes looks them up on the Gracenote CD Database.
    Burn the CD and make sure the info is there.
    Select the CD, then menu Advanced -> Submit CD track names.
    Ont he next computer, use iTUnes (or whatever program) to look up CD track names and it should retrieve them.

  • How to retain input file name in b2b

    Hi,
    I have requirement in the project where I need to flollow below steps
    1) pick up file -> transform into binary format -> push into JMS queue
    2) b2b channel listen to JMS queue -> transforms into text format -> creates .text file format.
    Every thing is working as expected however the issue is b2b is able to generate the file name is didn't match with the input file name though I have mentioned preserve file name option in b2b target channel.
    How can b2b generate/retain the file name which is same as picked up input file name by FTP adapter.
    Regards,
    Anjana

    Hi,
    Thanks. this issue has been resolved. If we set below proprties in bpel, b2b can retain same input file name.
    <copy>
    <from>concat("contentType:application/octet-stream;filename:",$varFileName )</from>
    <to>$varActionName</to>
    </copy>
    <bpelx:toProperty name="jca.jms.JMSProperty.ACTION_NAME"
    variable="varActionName"/>
    Regards,
    Anjana

  • How to apply input file name to output file in file adapter

    Hi Friends
    In my file to file scenario,i want to use input file name to output file by using adapter specific attributes,for this i have java code.Please suggest me how can i use this java code in mesg mapping and to which field i need to mapping this.
    Thanks
    pullarao

    Hi Pullarao,
    I have two questions ...
    1. Are u want the static file name in the target file?
    if yes...then follow the Bhavesh instruction.
    2.If u want a dynamic file name in the target file using UDF....then your UDF should mapped to the <b>root element</b> of target structure.
    /**********UDF********/
    Imports: com.sap.aii.mapping.api.*;
    Parameter: String filename
    String filename;
    filename = fileName + ".DAT";
    DynamicConfiguration conf = (DynamicConfiguration) container
           .getTransformationParameters()
           .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    conf.put(key, filename);
    return filename;
    /*******END UDF*******/

  • How do i u acsess my bluetooth settings thru my phone to change name etc. Also cant connect to any devices

    How do i u acsess my bluetooth settings thru my phone to change name etc. Also cant connect to any devices

    What devices are you trying to connect to, and are they in pairing mode? Is the phone in pairing mode? The iPhone only connects to audio devices and to computers for tethering. You cannot use BlueTooth on an iPhone for file transfers to other phones or computers.

  • Personalising secure zone webpages with client names etc

    I was wondering if it is possible to personalise a webpage with client first names so that when they log in, it displays their name etc. I know you can do this in the email marketing module, but I was wondering if you can do the same in a secure zone web page.
    Any help from the community greatly appreciated.

    Yes you can
    http://kb.worldsecuresystems.com/134/bc_1345.html?bc-partner#main_Secure_Zones_Modules
    Check out these modules that will render when someone is logged in.

  • Rename Batch input session name

    I am generating  a BIM after executing the depreciation  run with a name "RAB" instead of "NL2Z".
    But i am unable to process the wrong named BIM,
    How can i change the Batch input session name to new one.

    Hi,
    @Andreas 1) Batch Name is an Authorisation Object
    You will have to contact your BASIS people to get the authorisation to process the file.
    Kind regards

  • Cant use chinese character in input scheduler name

    Cant use chinese character in input scheduler name

    Dear Sorin Radulescu 
    The input template name can't use chinese character,not the value in input schesule. I can save the template whih name english characters . if save it in chinese characters, I can't open it in input schedule.
    thanks

  • Can you still sort songs by popularity, name, etc.

    Can you still sort songs by popularity, name, etc.? It does not appear as thought these options are still available.
    Message was edited by: DrDanCDman

    Hi Jim,
    I tried both things suggested and neither worked.  This just happened after updating. 
    Like thousands of others, I got an error message MSVCR80, and had to delete all Apple programs from my desktop and re-load iTunes. Since updating, nothing iTunes related has operated properly on my iPad, or Desktop.
    Very frustrating.  A service request to Apple results in a charge for service.  Very unfair since it is their own update that is causing the issues.
    Thanks for the suggestions.

  • "Get Info" Issues when updating music without prefilled artist name, album name,etc

    Hi there, trying to change track information such as artist, album name etc...when i do this, it allows me to change it on the get info tab, but then when i save it, it doesn't actually save and reverts back to no info and then in itunes, i cant sort by artist. it only has the track names way at the bottom with the track numbers and they are all mixed up with other like tracks...also, when i add a complete album, i cant actually change individual tracks at all under the get info tab. i have to select all of those tracks on that album under the recently added tab and then attempt to change them. when i do the individual tracks, it is not changeable at all. please help!
    dennis

    See Repair security permissions for iTunes for Windows.
    tt2

  • When I load cds i get a message that states, "User not registered for online use." This problem has only begun since the new itunes update and is only a problem on my pc laptop.  Media content (track names, etc.) do not load.  Thanks

    When I load cds i get a message that states, "User not registered for online use." This problem has only begun since the new itunes update and is only a problem on my pc laptop.  Media content (track names, etc.) do not load.  Thanks

    See  Re: itunes 12 track names not found and user not registered for online use.
    tt2

  • [svn:fx-trunk] 12985: Add metadata. xml for the SWC themes so that if Builder imports them they have nice names , etc.

    Revision: 12985
    Revision: 12985
    Author:   [email protected]
    Date:     2009-12-15 23:20:44 -0800 (Tue, 15 Dec 2009)
    Log Message:
    Add metadata.xml for the SWC themes so that if Builder imports them they have nice names, etc.  These need to be updated by the Builder team if we end up changing how sourceLocation works, etc.  Also would be good if we added metadata.xml for the CSS versions.
    Modified Paths:
        flex/sdk/trunk/samples/themes/arcade/build.xml
        flex/sdk/trunk/samples/themes/cobalt/build.xml
        flex/sdk/trunk/samples/themes/graphite/build.xml
        flex/sdk/trunk/samples/themes/zen/build.xml
    Added Paths:
        flex/sdk/trunk/samples/themes/arcade/src/metadata.xml
        flex/sdk/trunk/samples/themes/cobalt/src/metadata.xml
        flex/sdk/trunk/samples/themes/graphite/src/metadata.xml
        flex/sdk/trunk/samples/themes/zen/src/metadata.xml

    Note the last paragraph in the original post which explains how Flickr handles resolution changes without breaking the rectangles. Perhaps a more straightforward approach would be to store both the rectangle coordinates for each rectangle AND the image's width and height at the time the rectangles were created. Then if the image is scaled, the rectangles can be scaled accordingly. For example, if a rectangle is at x=100,y=200,w=50,h=70, the "original dimensions" are 1000x2000, and the image's current dimensions are 500x1000, then an application could assume the image has been scaled down by (500/1000=) 0.50, and so the x,y,w,h of each rectangle could also be multiplied by 0.50 (x=50,y=100,w=25,h=35). I'd recommend storing floating-point values so that multiple scalings don't make the rectangles "creep".
    Of course, it is possible that really the image was cropped rather than scaled, but fairly unlikely you would happen to crop it the same percent in both directions. Even if an image is cropped, someone could manually repair the rectangles by sliding and scaling them until the fit back on the faces (unless most of the faces were cropped off).
    A rectangle-aware application could scale and translate the rectangles during a crop or scaling operation, but other applications could still survive scaling if they at least preserve the XMP tags as-is.

Maybe you are looking for

  • Can not open selfcreated profiles in mobilemail 3G.

    Hi there. I created a profile for our university network, using wpa2 enterprise and PEAP. Everything should work just fine, but everytime I try to send the profile on my iphone via mail, I'm not able to open the attached profile. The german errormess

  • How can i use a code for an app in venezuela that was sent to me from the states?

    Please my cousin sent me an app as a gift but when i try to download it pops a message that says that my code will work just for store in the us, does anybody knows how change that code or any other way to use it here in Venezuela? thanks a lot

  • Changing Lightroom from Creative Cloud to Standalone?

    I bought a standalone CD for Lightroom 5 a while back and downloaded it onto my computer, then got a new computer. On my new computer, Lightroom somehow ended up as Creative Cloud, and it says I have to renew my membership to use the Develop Module.

  • Zen V Plus plays in random order -- whether I like it or n

    Hi All, I searched and read the FAQ but couldn't get an answer that addresses this issue: I've put my music on my new Zen V Plus (which I absolutely _love_!) and organized the songs into playlists. When I select a playlist and start it at the first s

  • Code compiles only when static methods are defined in a certain order

    CC: Sun C++ 5.9 SunOS_i386 Patch 124864-10 fails to compile the code below with "/tmp/notagain.cc", line 9: Error: static X::decode<X::T>() already had a body defined. "/tmp/notagain.cc", line 13: Error: Cannot use int* to initialize double*. struct