python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
It won't draw the line
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Game4 extends JPanel {
public Game4() {
setVisible(true);
}
public void paint(Graphics g) {
Graphics2D twoD = (G...
Jessie Smetts
Votes: 0
Answers: 1
Is there a way to anti-alias a graphics2d object in Java?
I'm not sure if the term "anti-alias" is correct in this instance, I'm quite ignorant about computer graphics, but I'm looking for a way to make the graphics of my Java program look less blo...

xfmw
Votes: 0
Answers: 0
Reverse the motion if its crosses the borders of the frame
I am working on program that should make rectangle moves from top to bottom and then left to right once the rectangle crosses the borders of the frame it should reverse its motion from right to left a...
MJ99
Votes: 0
Answers: 1
Java AWT Graphics - Interpolate Shapes with subpixel accuracy
I'm working on a project where I need an animation of balls moving on an ellipse (e.g. a circumference). At the moment, I'm drawing it all on a JPanel, by overriding the paintComponent() method, and t...
CLR 123
Votes: 0
Answers: 1