Newbie in Fullscreen Mode need help

hello
i am new to writing game in java.
i used to put component to panel, set Layout, that kind of things, to deal with user response.
now writing game, a full-screen one, i think of having only a frame and a canvas that draw the whole
output. i think this is probably what simple game do. so i have a frame and one canvas in side.
1. the problem is when i set the frame to full-screen mode, the canvas didn't get to the same size. it has size of zero!! so i can't create BufferStrategy from zero height canvas. how can i solve the problem. well, i can get BufferStrategy from frame and i can draw directly to the frame, not to the canvas.but is it the way it suppose to be? shouldn't i draw to something like canvas?
2. second problem is that, with no Component in full-screen frame, i Don't get KeyEvent at all !!!! how can someone play Quake without keyboard???
please help me out.

I took Frame. After all Frame is a Component. So you can get KeyEvents.

Similar Messages

  • Iphone4 upgrade ios5.0.1, done upgrade and reboot itself, iphone stuck at sos mode. need help!!

    iphone4 upgrade ios5.0.1, done upgrade and reboot itself, iphone stuck at sos mode. need help!!

    By "sos mode" do you mean recovery mode?  If so, you have to connect it to iTunes and restore it.

  • HT201210 i can't restore my iphone4 from 5.1 to 6 and it stuck in recovery mode need help

    i can't restore my iphone4 from IOS 5.12 to IOS 6 and it stuck in recovery mode need help please

    Read here > http://support.apple.com/kb/HT1808
    Hope that helps.

  • Im using iPad2, 16GB. stuck in recovery mode. need help.

    Hi. Im using iPad2. stuck in recovery mode, tried getting out but cant. need help badly.

    RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.
    3. Repeat the process if necessary.

  • Newbie to Java who needs help..

    Hello all.
    I am having some troubles making a random walker/Drunkard. What I have to do is make it that the user inputs the starting X, Y coordinates and the amount of steps he has to walk. After that, it is post to print back the new coordinates he walked to and the distance of his new coordinates is to the starting one. I am new to java so I am confused.. This is what I have so far..
    import java.util.*;
    public class Drunkard {
        private int x;
        private int y;
        private int numSteps;
        private int Distance;
        private int moveDrunk;
        public Drunkard() {
            this.x = x;
            this.y = y;
            this.numSteps = 0;
        public int getX() {
            return x;
        public int getY() {
            return y;
         public int getSteps() {
            return this.numSteps;
        private void move(int numSteps);
        private void moveDrunk(){
        moveDrunk = (int) (Math.random() * 4);
        public int getmoveDrunk() {
            return moveDrunk;
    public boolean getDistance{
    (int)(Math.sqrt((getX()*getX()) + (getY()*getY())));{
    return Distance
    import java.util.Scanner;
    public class DrunkardSimulator
        public static void main (String[] args)
            Scanner scan = new Scanner(System.in);
            System.out.print ("Enter the number of steps: ");
            numSteps = scan.nextInt();
            System.out.print ("Enter the starting x coordinate: ");
            x = scan.nextInt();
            System.out.print ("Enter the starting y coordinate: ");
            y = scan.nextInt();
            Drunkard drunk = new Drunkard();
            System.out.println("The drunk moved to X" +drunk.getX() + ", y " + drunk.getY() && "a distance of " + drunk.getDistance());
    }Any help would be nice.
    Edited by: orlfman on Apr 9, 2008 5:26 PM

    Sorry. I should have stated what I need help with..
    I need help with making him move randomly when the user types in the x,y starting coords, and the amount of steps he has to walk from what the user inputs. I also need help printing out the new x,y coords he walked to randomly and the distance his new coords are from where he first started at (the coords the user the typed in.)
    I have two files:
    Drunkard.java
    import java.awt.*;
    import java.util.*;
    public class Drunkard {
        private int x;
        private int y;
        private int numSteps;
        private int Distance;
        private int moveDrunk;
        public Drunkard(int x, int y) {
            this.x = x;
            this.y = y;
            this.numSteps = 0;
        public int getX() {
            return x;
        public int getY() {
            return y;
         public int getSteps() {
            return this.numSteps;
        public void moveDrunk(int numSteps){
             for (int i=0;i<numSteps;i++) {
            if(rand.nextInt(2)==1) { x+=1; } else { y+=1; } }
        public int getDistance(){
    (int)(Math.sqrt((getX()*getX()) + (getY()*getY())));{
    return Distance
      }And DrunkardSimulator.java
    import java.util.Scanner;
    public class DrunkardSimulator
        public static void main (String[] args)
    int x;
    int y;
    int numSteps;
            Scanner scan = new Scanner(System.in);
            System.out.print ("Enter the number of steps: ");
            numSteps = scan.nextInt();
            System.out.print ("Enter the starting x coordinate: ");
            x = scan.nextInt();
            System.out.print ("Enter the starting y coordinate: ");
            y = scan.nextInt();
            Drunkard drunk = new Drunkard(x,y);
            drunk.moveDrunk(5); //5 steps
            System.out.println("The drunk moved to X,Y" + drunk.getX() + drunk.getY() + drunk.getDistance());
    }Edited by: orlfman on Apr 10, 2008 12:29 AM
    Edited by: orlfman on Apr 10, 2008 12:31 AM

  • Newbie at this and need help

    Hello,
    I am a complete newbie at this Itunes stuff and I have some very basic questions. If somebody would be willing to help me out I would appreciate it. So I have loaded Itunes on my PC. I then put in a cd that my friend burned a ton of songs on for me thinking that the CD would automatically appear in Itunes where then I could move it to my Itunes library. However the CD doesn't appear in Itunes and the only way I can play it is just through Windows Media. Any idea on how to get this to my Itunes library?
    In addition, sometimes when I try to play a song in Itunes it says that it can't find the file and asks if I want to locate it. I saved the burned CD in the Itunes folder on my computer but it still didn't seem to work. Any suggestions?
    Thanks for any help you can give.
    Chris

    I don't know much about CD not working problems, someone else will probably chip in.
    As a workaround while you are sorting it out, you can import tracks with Windows Media Player. You need to set the format to MP3 in the WMP options. On the latest version you have to click on Rip to find it. I don't remember where it is on the earlier version.
    Once you have imported the tracks find the name of the folder they are in, then open iTunes and click:
    File>Add folder to library
    Before you do this, you need to decide if you are happy to leave the tracks where they are or if you want to make a copy of them in the iTunes Music folder. You can set this in
    Edit>Preferences>Advanced>general
    There is a check box labled "Copy files to iTunes Music folder when adding to library.
    iTunes will work OK either way.
    On the CD thing - you should find "Run CD diagnostics" on the help menu - you could post the result here.
    (I am using Version 6.0.5 so things may not be quite the same on your version)

  • Newbie: Received Flash content - need help embedding - onClick

    Hi,
    I received a web banner from one of our suppliers that I need to embed into our website.  I've got it into the web page but don't know how to configure an "onclick" action.  In my reading I don't find a parameter to specify what action to take if someone clicks on the banner.  Right now it opens a new window with an error saying it can't find "/undefined".  How do I defined the URL?  The vendor that gave us the marketing content has been of no help.
    Thanks.
    Steve

    Hi Ned,
    Here's ProCurve's code and My code.  Do I need something like this?
    <param name="clickTag" value="http://www.mysite.com/procurve" />
    ProCurve code:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="160" height="600" id="2325PWC8003_ISS_160x600" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="2325PWC8003_ISS_160x600.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="2325PWC8003_ISS_160x600.swf" quality="high" bgcolor="#000000" width="160" height="600" name="2325PWC8003_ISS_160x600" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    My code:
        <object
            classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
            codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
            width="160"
            height="600"
            id="2325PWC8003_ISS_160x600"
            align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="movie" value="flash/procurve/ISS/2325PWC8003_ISS_160x600.swf" />
            <param name="quality" value="high" /><param name="bgcolor" value="#000000" />
            <embed src="flash/procurve/ISS/2325PWC8003_ISS_160x600.swf"
                   quality="high"
                   bgcolor="#000000"
                   width="160"
                   height="600"
                   name="2325PWC8003_ISS_160x600"
                   align="middle"
                   allowScriptAccess="sameDomain"
                   type="application/x-shockwave-flash"
                   pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
    Thank you very much for your help!
    Steve

  • Newbie: Received Flash content - need help embedding

    Hi,
    I received a web banner from one of our suppliers that I need to embed into our website.  I've got it into the web page but don't know how to configure an "onclick" action.  In my reading I don't find a parameter to specify what action to take if someone clicks on the banner.  Right now it opens a new window with an error saying it can't find "/undefined".  How do I defined the URL?  The vendor that gave us the marketing content has been of no help.
    Thanks.
    Steve

    Hi,
    I received a web banner from one of our suppliers that I need to embed into our website.  I've got it into the web page but don't know how to configure an "onclick" action.  In my reading I don't find a parameter to specify what action to take if someone clicks on the banner.  Right now it opens a new window with an error saying it can't find "/undefined".  How do I defined the URL?  The vendor that gave us the marketing content has been of no help.
    Thanks.
    Steve

  • Newbie question II - Still need help........

    Thanks! But I'm still lost.....
    Here's my entire program...
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class Lab10 extends Applet implements ActionListener {
    private Button plusOne;
    private Button minusOne;
    private Button reset;
    int buttonCount=0;
    private Color myColor = Color.blue;
    //Color myColor = Color.red;
    public void init() {
    Button plusOne=new Button ("Increase count by one");
    add(plusOne);
    plusOne.addActionListener(this);
    Button minusOne=new Button ("Decrease count by one");
    add(minusOne);
    minusOne.addActionListener(this);
    Button reset=new Button ("Reset the count");
    add(reset);
    reset.addActionListener(this);
    add(plusOne);
    add(minusOne);
    add(reset);
    }//end of init
    public void paint(Graphics g){
    g.setColor(myColor);
    g.drawString("The count is:"+buttonCount+".",50,50);
    }//end of paint
    public void actionPerformed (ActionEvent e){
    if (e.getSource()==plusOne); {
    buttonCount=buttonCount+1;
    g.setColor(myColor);
    myColor=Color.blue;
    else (e.getSource()==minusOne);{
    buttonCount=buttonCount-1;
    g.setColor(myColor);
    myColor=Color.green;}
    else {
    (e.getSource()==reset);{
    buttonCount=0;
    g.setColor(myColor);
    myColor=Color.red;}
    }//end of else
    }//end of if
    }//end of actionPerformed
    }//end of class Lab10
    I'd appreciate any help!!!!!!!!!!!!!!!!!!!! Still getting the variable g error too!
    Thanks

    Hi!
    In the actionPerformed method, you are trying to access a variable named "g" which is only accesible by the paint method. The point is that you CANT use g on actionPerformed.
    To solve your problem, just delete the line where it says:
    " g.setColor(myColor); "
    Also take the semicolon out on every "if clause", like this one:
    " if (e.getSource()==plusOne); { "
    and finally...
    after the line:
    " myColor=Color.blue; "
    just type:
    repaint();
    That way, you will call the paint method automatically, which is exactly what you need.
    It should look like this:
    if (e.getSource()==plusOne)
    buttonCount=buttonCount+1;
    //g.setColor(myColor);
    myColor=Color.blue;
    repaint();
    Ok, that should do it. Take care and hope it works!!

  • Old phone stuck in recover mode need help!

    Okay so I decided I was going to use my old iphone 4 again but it is stuck in recovery mode. I tried syncing it with itunes but my new iphone 5s keeps poping up and not this device. I can't get the iphone 4 to pop up so I can get it out of recovery mode. Can someone help me please?

    Hmm. Do you have a PC or a Mac that you're trying to sync with?
    I can get you an article with some steps to try to get your computer to see your iPhone.
    ~Lyssa

  • K8N+SLI Mode - Need help

    Hello,
    I was going to buy the second graphic card for my computer to work in SLI Mode. Nowadays I am using:
    MSI GeForce 6600 128MB DDR3/128 bit TV/DVI/VIVO PCI-Express (8979-06S)(NX6600-VTD128E Diamond)
    so I went to the shop, in which I always buy computer parts and got there an information that this card is no more available 
    The only two models of MSI Graphic cards (based on 6600 chipset) that are available are:
    MSI GF 6600 128MB/128b TV/DV PCI-E MS-8981-Z02
    And
    MSI GeForce 6600GT 128MB DDR3/128bit TV/DVI PCI-Express (8983-010) (NX6600GT-TD128E)
    Will any of the mentioned card work with my MSI GeForce 6600 128MB DDR3/128 bit TV/DVI/VIVO PCI-Express (8979-06S)(NX6600-VTD128E Diamond)?
    Please HELP ME!
    Greetings

    try to boot with 2 memory sticks only, when using 4 sticks setup memory index to 333. (Winchester core had bad mem. controller on it aswell, it may not handle 4 sticks property)
    Clear CMOS Guide
    and re-test.
    next thing is your PSU, doesn't look to have enough juices for your VGA. VGA min req.(over 30A on +12V for single rail, over 22A for dual rail +12V by ATI)
    your PSU got +12V1 17A, +12V2 17A
    good PSU recommendation:
    https://forum-en.msi.com/index.php?topic=103299.msg757739#msg757739
    or borrow from friends to test.

  • Newbie here...Need help for XServe RAID w/ XSAN in Vid Editing environment

    We're establishing an XSAN environment for video editing work flow. We're not new to SAN technology or video editing, but we are new to Xserve RAIDs, XSAN technology, and marrying them together in a production environment.
    We have an XServe RAID at 14x750GB configuration. 1 Xserve metadata server, 1 Xserve Quicktime server, and 4 editing stations (2 MacPro's, 2 G5's) that are in the fiber channel fabric. Each machine has dual channel 4GB cards.
    My PLEA for help concerns any advice this community can offer on RAID configuration, and XSAN configuration to achieve maximum performance. Settings, configurations, etc.
    XServe, XServe RAID, XSAN, MacPro, G5 Mac OS X (10.4.9)

    Were on the same boat but more like a life jacket
    We only need the Fibre for back-up.
    We have a single Avid Adrenaline on MacPro.
    One Xserve that basically acts as a server for fonts, audioclips, photocatalog and minor back-up via gigabit ethernet.
    Three G5s/MacPro/PC with 2/4GB FC installed.
    One 10.5 TB Xserve RAID.
    Last but not least a QLogic 1400 SAN box for Fibre.
    Nothing is installed yet as were waiting on our Apple rep for some answers with Xsan.
    Were not serving anything as far as external network and everything stays within the confines of our studio.
    My question is that are we missing anything other than maybe getting more ports on the SAN.
    We can live with a few workstations in the fabric.
    Thanks in advance
    XServe   Mac OS X (10.4.6)   OSX Server

  • HT201210 my iphone is locked up "in recovery mode"  need help unlocking

    Does anyone have any idea how to unlock "iphone in recovery mode". videos from youtube have not worked

    Connect to the computer you usually sync with and use
    iTunes on that computer to restore the iPhone.

  • Newbie in portal and need help

    Hi,
    In portal, is there any view (like data dictionary views) where I can get the name of the reports and the name of the tables or views that they are based on
    example.
    let's say I have 2 reports.
    1- rept_dept based on scott.dept table
    2- rept_emp based on scott.dept and scott.emp table
    I need a SQL statment that will produce this output
    report name table_name
    rep_dept scott.dept
    rep_emp scott.dept
    scott.emp
    Thank you !
    Gregg.

    Jose,
    i suggest you start with looking at the status of the report with id=14511 in the logs of the reportserver. You can find these from the Oracle Entreprise Manager by selecting the reportserver -link, than follow the failed/completed task-links.
    If the report finished succesfully, Internet Explorer probably tried to show the report before it was finished. If this is the case, you can build a small timer that waits for the report to finish or that queries the report server if the report is finished before you trie to show the report.
    Questions:
    Can you show the report when you enter the url to the report manually in Internet Explorer?
    Do you use Headstart?

  • Newbie at Illustrator scripting needs help assigning image

    I am trying to copy a graphic stored in a vb.net picturebox.image into an activeLayer of an illustrator document. Can anyone supply me with code as to how to do it. Also is there a way to lookup a swatch by name and not have to rely on knowing it's index as in this line of code : pathRef.StrokeColor = docRef.Swatches(3).Color. I know the swatch's name is "CutContour" I would like to assign it by name. And lastly does anybody know any good books, links, etc.. that show you how to do this kind of stuff.
    Thanks,
    Bruce
    Imports IDAutomation.Windows.Forms.LinearBarCode
    Imports Illustrator
    Public Class FormMain
        Dim barcode As IDAutomation.Windows.Forms.LinearBarCode.Barcode = New Barcode()
        Dim illustrator As Illustrator.Application = CreateObject("Illustrator.Application")
        Dim filePath As String = My.Application.Info.DirectoryPath
        Private Sub FormMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            barcode.SymbologyID = barcode.Symbologies.Code39Ext
            barcode.BarHeightCM = 1
            barcode.XDimensionCM = 0.03
            barcode.NarrowToWideRatio = 2
            barcode.LeftMarginCM = 0.201
            barcode.TopMarginCM = 0.201
            barcode.TextMarginCM = 0.051
            barcode.ShowText = False
            barcode.CaptionBottomAlignment = StringAlignment.Center
            barcode.CaptionBottomSpace = 0.03
            Dim barcodeText As String = "CODE39UPC" 'hard code barcode content for this test
            barcode.DataToEncode = "*" + barcodeText + "*"
            barcode.CaptionBelow = barcodeText
            PictureBox1.Image = barcode.BMPPicture 'Display Barcode
            barcode.SaveImageAs(".\upc.png", System.Drawing.Imaging.ImageFormat.Png)
            Dim fileName As String = filePath + "\Roland VersaWorks.eps"
            Try
                 illustrator.Open(fileName)
             Catch err As Exception
                 MsgBox("Missing File: " + fileName)
                 illustrator.Quit()
                 Me.Close()
             End Try
            Dim docRef As Illustrator.Document = illustrator.ActiveDocument
            Dim pathRef As Illustrator.PathItem = docRef.ActiveLayer.PathItems.Rectangle(100, 0, 300, 100)
            pathRef.StrokeColor = docRef.Swatches(3).Color 'Set strokeColor to CutContour Swatch
            pathRef.Filled = False ' Don't Fill rectangle with anything
            docRef.ActiveLayer = docRef.Layers(2) 'Activate UPC Layer
            '############## I need to copy PictureBox1.image into this activeLayer! How do I do it? ###########
            Dim epsOptions As Illustrator.EPSSaveOptions = CreateObject("Illustrator.EPSSaveOptions")
            epsOptions.CMYKPostScript = True
            docRef.SaveAs(filePath + "\test.eps", epsOptions)
            illustrator.Quit()
            Me.Close()
        End Sub
    End Class

    Hi,
    Hodge-Podge wrote:
    Also is there a way to lookup a swatch by name and not have to rely on knowing it's index as in this line of code : pathRef.StrokeColor = docRef.Swatches(3).Color. I know the swatch's name is "CutContour" I would like to assign it by name.
    I have no knowledge in VB, but in javascript
    it should be called by:
    var mySwatche=app.activeDocument.swatches.getByName("CutContour");
    Regarding how to copy, i guess that you can load picture as raster / placed items or cut() & paste()... it's just ideas,
    Sorry, art.chrome

Maybe you are looking for