Search:

Type: Posts; User: tim8w

Search: Search took 0.14 seconds.

  1. Replies
    3
    Views
    312

    [SOLVED] Re: Java Inheritance Question...

    Greg,
    Thanks for the response. I think I get it now...
  2. Replies
    3
    Views
    312

    [SOLVED] Java Inheritance Question...

    Hi,
    I have a stupid question. Trying to teach myself about Java Inheritance. I have the following classes:


    public class A
    {
    private int iClassVariableA;

    public...
  3. Replies
    4
    Views
    448

    Re: Drawing on a JFrame that has a Shape

    Norm,
    I understand what you were trying to do in your example. Thanks. Here's what I got based on your suggestions:


    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Rectangle;...
  4. Replies
    4
    Views
    448

    Re: Drawing on a JFrame that has a Shape

    Norm,
    @Override does not work in the main, only from an extended class (at least that's what the compiler says anyway)

    So you are a moderator on both Forums?
  5. Replies
    4
    Views
    448

    Drawing on a JFrame that has a Shape

    This post is cross posted here:
    Drawing on a JFrame that has a Shape (Swing / AWT / SWT forum at JavaRanch)

    Hi,
    I have created a JFrame for my application that has a custom shape. In this case...
  6. Replies
    1
    Views
    338

    Re: Mimicking a JButton Click

    Got it to work by doing the following:


    @Override
    public void doClick()
    {
    if (isEnabled())
    {
    ...
  7. Replies
    1
    Views
    338

    Mimicking a JButton Click

    Hi,
    I have calss JPButton that extends JButton. It basically is a graphical button that shifts 1 pixel to the right and down when mousePressed(), and shifts back when mouseReleased(). Both of those...
  8. Thread: KeyListener

    by tim8w
    Replies
    9
    Views
    479

    Re: KeyListener

    Norm,
    Not sure what you mean. MyClass creates a JButton adds it to the Frame Container and displays the Frame with the button on it. That much works just fine. And as I mentioned if I assign the...
  9. Thread: KeyListener

    by tim8w
    Replies
    9
    Views
    479

    Re: KeyListener

    Norm,
    As you should be able to see in the code, I tried to set the KeyListener to the Container. I have a breakpoint in the debugger in all three key routines and it never gets there. I have also...
  10. Thread: KeyListener

    by tim8w
    Replies
    9
    Views
    479

    Re: KeyListener

    Norm,
    Everytime I try and post the small complete program, the Forum deletes the post...
  11. Thread: KeyListener

    by tim8w
    Replies
    9
    Views
    479

    Re: KeyListener

    Norm,
    Here's a simple example. I have breakpoints in the debugger on all three key functions and they never get called:


    import java.awt.Color;
    import java.awt.Container;
    import...
  12. Thread: KeyListener

    by tim8w
    Replies
    9
    Views
    479

    KeyListener

    I have a JFrame to which I have added JButtons.


    win=new JFrame("MyFrame");
    win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    win.setBounds(400,200,335,630);win.setResizable(false);...
Results 1 to 12 of 14