• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

This Application hates me!!! :(

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All!
i'm trying to convert an applet to an application! I followed teh instructions indicated at the address:
http://www.rgagnon.com/javadetails/java-0305.html
So far, as they say, so good! My maina method looks like this:
public static void main (String args[])
{
Frame ticTT =new Frame();

ticTT.addWindowListener (new java.awt.event.WindowAdapter()
{
public void windowClosing (java.awt.event.WindowEvent e)
{
System.exit(0);
};
});
TTTgame myGame = new TTTgame();
myGame.setSize(400,400);
ticTT.add(myGame);
ticTT.pack();
myGame.init();
ticTT.setSize(400,400);
ticTT.show();
}
When I compile, the application looks the same as it did in the applet. However, none of my mouse clicks are working! and it's driving me !!
Been trying to read up and try things for the past 3hrs but i'm as clue-less as I was then!!
Please, do you have any suggestions, any ideas what I'm doing wrong??
Oh by the way, this is the Tic Tac Toe game!!
Class details below:
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class TTTgame extends Panel implements MouseListener
{
.....
}
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



Do you have an "addMouseListener (this)" in the TTTGame panel?
Ed
 
reply
    Bookmark Topic Watch Topic
  • New Topic