Canvas « JFrame « Java Swing Q&A





1. Canvas isn't resizing with window in Java?    stackoverflow.com

I have a jFrame with a Canvas on it. When I run my program in Windows XP/Vista and resize the window the canvas resizes proportionately along with the window. However, in ...

2. How can I make my GUI Frame larger?    stackoverflow.com

The problem is, I am unable to make it a dimension with 800x600. In other words, when I run the program, the frame is so small that I can not do ...

3. Why is my Canvas not drawable after adding it to my JFrame?    stackoverflow.com

I am writing a little game that uses a Canvas instance to draw on (in case it is familiar; I use the game library LWJGL). Now I have created a main menu ...

4. Canvas in JFrame    forums.oracle.com

Hello, I was wondering how I would draw to Canvas in JFrame. I created JFrame using NetBeans JFrame Form. Now when I try to draw it nothing comes up. My code is as follows: Graphics graphics = canvas.getGraphics(); graphics.drawRect(5,5,1,2); //canvas.paint(graphics); canvas.repaint(); But I'm not getting anything. Any help would be much appreciated. Thanks in advance.