Graphics « JFrame « Java Swing Q&A





1. Displaying GUI components in Java    stackoverflow.com

I have a GUI window that I've created using Netbeans. I then ported the code into my own program so that I can display .png's at my will. However, the GUI components ...

2. output a jFrame to jpeg or bitmap    stackoverflow.com

I've been working on an assignment, and have all the requirements completed. The project is to compare the differences in runtime between a linear search algorithm and a binary search. ...

3. Java2d: Option to show a selection window when mouse is dragged    stackoverflow.com

I have a image in Java2d and I would like user to give an option to select any rectangle portion of the image by left clicking and dragging the mouse.(similar to ...

4. Help with simple frame and graphics    stackoverflow.com

For homework, I'm trying to create a "CustomButton" that has a frame and in that frame, I draw two triangles, and a square over it. It's supposed to give the ...

5. Help with adding a paddle to a JFrame    stackoverflow.com

This is an excerise i have to complete for a uni course, its not a marked assignment and i could do with a bit of help. I can get the ball ...

6. moving a shape across a jframe    stackoverflow.com

Basically my entire program is to have shapes move across a JFrame, and the problem I am having is that I cannot get my object to move. I have a class called Creatures ...

7. Graphics not appearing in JFrame (SSCCE included)    stackoverflow.com

I am making a game (see my previous threads) and have encountered a lot of problems on the way. All I know is that he code compiles, runs, but nothing appears ...

8. Graphics contents get erased on maximized    stackoverflow.com

I am developing a GUI painting application. But the problem is that the frame contents get erased on minimizing and then maximizing. I know what the problem is, it's ...

9. Newly created graphics object only showing after resize of frame    stackoverflow.com

This is a continuation from this post I have a set of random sized graphics adding and drawing onto a JPanel component. I have a button that is adding a new ...





10. How grab image/graphics/capture of what's behind a frame or window?    coderanch.com

I'm trying to make a window that you can see through (and hopefully move around). The problem is that Robot doesn't work when you move the image. Imagine a window like this: ||------|| || || <--Outer side is 10 pixels wide || || ||------|| When I use Robot to grab a screen capture to make the inside have the image of ...

11. Graphics inside Frame    coderanch.com

12. Use of Graphics in jFrame    coderanch.com

13. Need Help with graphics / Jframe    java-forums.org

package Game; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; public class Starter extends JFrame implements ActionListener { Starter(){ super("Game Selector"); JButton Close = new JButton("Close"); JButton maze = new JButton("Maze"); JButton idk = new JButton("idk"); JLabel tell = new JLabel(" Please Select A Game"); GridLayout Lay = new GridLayout(4,2); setLayout(Lay); add(tell); add(maze); add(idk); add(Close); this.setSize(400, 400); setVisible(true); Close.setActionCommand("Close"); Close.addActionListener(this); maze.setActionCommand("Maze"); ...

14. The graphics doesn't cover whole window and is moving    java-forums.org

I am still experimenting with my program trying to give it some functionality with the help of threads, I will add that later but now my problem is as the first image shows, the graphical component when added to the frame isn't covering the whole frame. When the filledOval is moving, the whole graphical component moves not only the filledOval as ...