Search:

Type: Posts; User: javapenguin

Search: Search took 0.09 seconds.

  1. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    I know what's throwing it. It is trying to draw an image that initially won't be defined till I hit a button.

    I was asking how to fix the repaint() call.

    setFile() should instantiate it. ...
  2. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    Got some things to work, but the image still isn't being drawn when I call getImage().

    Also, how do I deal with the Null Pointer Exception?


    import java.awt.event.*;
    import java.awt.*;...
  3. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    But how do people have different methods to draw something?

    Also, paint seems to be being called repeatedly.

    Also, another funny thing, I don't quite get how an abstract method from Graphics...
  4. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    It looks like the one you posted when you first started, yes.

    How do I fix that?

    In addition to that, apparently I don't know how to use getGraphics().

    I tried it in another test program...
  5. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    Why does my token for this page keep expiring?

    Anyway, I got this when I enlarged it:
  6. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    If you mean that I don't have any title for the JFrame or anything in the JPanel object that is attached to the tab, you are correct.

    Though why it won't add an image though it should to the...
  7. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    There should be more. Not sure what you mean by "only title bar".

    Here is what I have now:


    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    import java.io.*;
    import...
  8. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    The first example at the very beginning was a simpler example.

    The one I'm talking about now is far more complex.

    Sorry for the confusion.

    I was able to solve the original problem, I...
  9. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    I tried painting a component and it won't paint.

    I think I'm having trouble understanding how to use paint and stuff.

    I have a better code but now everything compiles without exceptions but...
  10. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    Ok, I altered it to avoid that unknown class altogether.

    But now it got rid of Null Pointer message but still my image must be being drawn in invisible ink.

    How do I make it show up?

    ...
  11. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    I had thought so, but it appears that the println statement is throwing the error.

    To make this more bizzare, I recopied the code into the class's paint method and called it and instead of making...
  12. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    I believe that the variable willthiswork is null.

    I tried printing it and it threw a Null Pointer Exception so that proves it.

    The question is....why is it null?

    I instantiated it.
  13. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    To stop making a very long post, I'm going to another post.

    I've just noticed something else. It says that I have to turn off double buffering to use DebugGraphics.

    I'm not even quite sure...
  14. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    Add image to jar file.

    I'm not sure what Kevin meant by BufferedImage and dirty windows.

    I am trying something, to see if my plan would work to use a DebugGraphics object to be used to call a...
  15. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    Painting as in Microsoft Paint is what I'm referring to.

    However, it probably wouldn't hurt to call paintComponent() all the same.

    However, Graphics still is abstract. I did think of passing...
  16. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    Ok, I changed it to Component and it neither hurt it nor really made it show up.

    Hmmmmm...by any chance is that problem with the JScrollPane a problem with my layout?

    The thought just occurred...
  17. Re: Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same t

    I figured out a way to get it to work by using Box Layout. Though I didn't try it with the test program, but another, bigger one.

    However, I have two new problems, one of them is probably...
  18. Can't get a JToolBar, JMenuBar, and a JTabbedPane to all be visible at the same time.

    For some reason the JTabbedPane isn't showing up. I tried changing its orientation to bottom and then left to see if that would fix it but it didn't.

    It was just a simple program to see if all...
Results 1 to 18 of 18