Questions tagged [awt]
The Abstract Window Toolkit (AWT) is Java's original platform-independent windowing, graphics, and user-interface widget toolkit.
29 questions
3 votes
1 answer
65 views
HsbColor: a class representing a HSB/HSV color
I was looking for a way to adjust saturation and lightness of java.awt.Colors that don't expose that kind of API I wrote my own ...
1 vote
1 answer
339 views
Generate and Control JMenu Radio Buttons Using An Enum
Put together a RadioMenu class that can use a Enum to generate a Single-Selection Radio Button Menu. My main question is about whether there's a way to remove the ...
1 vote
3 answers
563 views
Bank Account GUI
I've decided it would be best to break this project down into several parts. Consider this Part 1(GUI Design). I'm looking for help making 2 main improvements: Whenever I make a GUI, its always very ...
2 votes
0 answers
392 views
KeyEvent listener: mapping physical keyboard to onscreen keyboard [closed]
I have an assignment to create a GUI with a keyboard and text area. Conceptually, the user would type on the physical keyboard and the respective key would change background on screen to reflect that ...
1 vote
2 answers
15k views
Cookie Clicker in Java
This is my first graphical application I have made in my life (except HTML and Javascript-Applications, if that counts). It's a simple implementation of Cookie Clicker, the famous browser game. ...
6 votes
2 answers
2k views
Animation of java.awt.Polygons
I made a class capable of moving Polygons around on a Polygon in a mostly smooth manner. Disclaimer: this was part of a school project (thus the use of Polygon rather than Image), but this code is ...
2 votes
3 answers
3k views
Drawing a star in AWT
I am new to java and graphics, and I am creating a java program that draws a star. It took me a few hours, but I finally have it drawing a star, but I am wondering if there is a better way to write ...
3 votes
1 answer
2k views
SpaceWar game in java
I made this game which should imitate a spaceship and obstacles (planets). Move spaceship and try to hit everything. I will add some others features and functionality (better images or whatever). I ...
3 votes
0 answers
73 views
GUI rogram connecting to SQL and listing information about products in specific category
This is my very first application written in Java and so I finalized it, solely because it occurred to be my thesis. It is a very simple program that lists categories (Northwind database is used as a ...
1 vote
1 answer
408 views
Animate an oval shape using Thread
I have this project that should continuously animating using for loop. Also I want to include variations on the position where the ball pass through. Can anyone please check my code if I am following ...
7 votes
3 answers
15k views
Creating a chess board
One of my assignments was to create a chessboard. In this assignment I could not use an array, or a form of list or what not. Below is my code for the creation of the chessboard: ...
5 votes
2 answers
264 views
"I'm Listening"
For this next assignment, my job was to create a GUI with a button that changes text and color when clicked, and a slider that updates a label (with a TitledBorder) ...
12 votes
2 answers
371 views
Custom drawString() for game development
About / Background This is indirectly a follow up from: General Game Loop 3.0, if you prefer to test against it, feel free to. That code is very outdated now though. A test suite is given at the end. ...
4 votes
1 answer
9k views
Java Dice Roller with GUI
Three days ago I wrote about a Java Dice Roller I wrote. I've now added a GUI to that program. Here it is: DiceRollerGUI.java: ...
1 vote
1 answer
271 views
Calculation of image offsets for performing cropping
I am using the java.awt.Rectangle class to construct subsets of a GEOTIFF file. In order to do this I would need to specify the x,y offsets, height and width of ...