Swing is a GUI toolkit packaged with the standard Java SDK since version 1.2.
0
votes
1answer
20 views
Custom TableRowSorter - New sort order
The purpose of this custom TableRowSorter is to provide me with a different sort order of the columns. It changes the sort order from...
4
votes
3answers
121 views
Swing Temperature Converter
I made a simple temperature converter to serve as an introduction to swing. I used Eclipse WindowBuilder and did not attempt to make the components more modular. I'm curious as to how you guys would ...
1
vote
2answers
86 views
Simple magic 8 ball program
I would just like some input on how I may improve my code(in terms of content not formatting) without changing the output. It's just a simple magic 8 ball program using dialog boxes.
...
1
vote
1answer
45 views
Basic 4-function Java Calculator with Swing
I can see that there are a lot of java calculators on here, so I hope it hasn't gotten too old. This is a basic 4-function calculator in java using the swing interface. I am positive that it is ...
4
votes
1answer
161 views
4
votes
1answer
85 views
2 Player TicTacToe Game
I am a beginner Java programmer and I have just finished creating a simple 2 player TicTacToe game and would appreciate some feedback/advice on how to make it better.
...
1
vote
1answer
102 views
Integer sum program
This is a little assignment I am working on. I am a beginner Java programmer and would love some advice on how to improve this code.
For more context, here are the assignment details:
Create a ...
2
votes
1answer
113 views
Tic Tac Toe against Al
I'm working on a project that has an option to playing against Al, so I started to make it in a separate class and just extended the main class which has an object of a GUI class which draws the ...
3
votes
0answers
32 views
JFreeChart generic plotting tool
I have created a bit of code that plots data for a project (XY Line Chart). It works. But it isn't what I'd consider good. I am looking to improve it in two ways:
Make it more generic, so that I can ...
7
votes
3answers
103 views
Swinging Tic-Tac-Toe
This is just a simple PvP tic tac toe program, I'm learning and just looking for maybe some feedback on how to improve it?
There are mainly two things I can see improvement for, the action listener ...
1
vote
0answers
16 views
Sine Calculator without Math JAVA jFrame SwingGUI [closed]
I've got to design a sine button function as part of a jFrame calculator. It has to be done without using math libraries. I have a jInput1TextField where you input the number you want to find the sine ...
2
votes
2answers
56 views
SQL Query to display minimum prices per country
I have developed a Tender management System sort of code for one of my client. This is the piece of code :
...
8
votes
2answers
478 views
Velocity, Distance and Time Calculator
This is a velocity, distance, and time calculator that I wrote not too long ago. How can I improve upon this code?
...
3
votes
1answer
142 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 ...
6
votes
2answers
75 views
A simple Python IDE in Java Swing
I've made an IDE in Java, using swing. It uses a couple of resources (prefs.json and help.txt) and some imported .jar files for reading the JSON. I know the code's quite long, but the answer doesn't ...
5
votes
1answer
72 views
Displaying game progress in a JApplet
I gave myself a small project to work on and at first I wanted to use the MVC approach, but I got confused as to which part of my code should go into which class. I did some research and still don't ...
1
vote
1answer
50 views
File-copying Manager
I have the following java class which has many private variables and methods:
...
6
votes
1answer
114 views
Ping Pong game in Java
This is my first application in Java, it imitates the world-known Ping Pong Game.
I have a lot of questions in my mind...
I read that the class Timer is not ...
1
vote
0answers
37 views
Customized JPanel desing pattern
This is an example of the Java Swing application I've wrote. I'm trying to follow the first Effective Java items. I wrote some classes similar so I've posted only this class for the review.
...
4
votes
1answer
52 views
Swing Game EyeHandCoordination
Question copied from the book:
(Game: eye-hand coordination) Write a program that displays a circle
of radius 10 pixels filled with a random color at a random location on
a panel, as shown in ...
1
vote
3answers
88 views
Random password generator in Java
I made a random password generator in Java using a GUI. In the program, the user can choose the length, and whether to include lowercase letters, uppercase letters, symbols or numbers in the password. ...
0
votes
1answer
37 views
Highlight Two Closest Points Java Swing
Question from the book:
(Geometry: closest pair of points) Write a program that lets the user click on
the panel to dynamically create points. Initially, the panel is empty. When a
panel has two or ...
7
votes
3answers
221 views
Morse code translator GUI
I made a Morse code translator in Java in which a user inputs a word/words into a text field and the program converts it to Morse code and beeps the Morse code. I have a feeling that my code could be ...
2
votes
0answers
46 views
Swing keybinding to control an animated car
In my textbook there is no mention of keybindings and it encourages the use of keylistener so there isn't any example code using keybindings for its problems. I was wondering if this is sorta close to ...
4
votes
1answer
96 views
A simple MP3 file arranger
I am creating a simple Mp3 Files Arranger the Project is on Github
Questions:
How can I optimize this app?
Am I violating any OOP principle?
Is it readable?
How can I make it better?
GUI.java
<...
6
votes
2answers
121 views
Guess a number game with mines version 3
I'm still new to Java and learning programming, so my main goal is to learn to making good code, so I don't want to do anything complex until I fix all of my bad coding habits on smaller programs.
So,...
2
votes
0answers
56 views
NBP currency application
I have a small program in Java with GUI, which is showing NBP currency data in specified tabs. It downloads data from www.nbp.pl using XML format and saving it into Apache Derby database using ...
5
votes
2answers
55 views
Sieve of Eratosthenes with a Swing UI
I'm fairly new to Java. I want to divide my code into 3 classes. First class to contain my GUI, second to compute the algorithm and third class to write results in my file. I have the code working but ...
1
vote
1answer
138 views
Winning logic for Tic Tac Toe and OO design
I'm a Java beginner and I've just started learning about GUI. However, I'm not sure about GUI coding conventions and whether I'm getting the object orientation part of it right. I feel like I'm ...
4
votes
1answer
122 views
Simple Java RSS reader
As a study project I was supposed to write an RSS reader in Java (I used Swing to make GUI) using MVC pattern.
I finished it, but it's not quite polished yet (still gotta write these javadocs and add ...
5
votes
1answer
44 views
Bare bones painter app in Java - follow-up
See the previous iteration: Bare bones painter app in Java.
I have improved my program thanks to all the answers in the initial post. Now I have this:
App.java:
...
7
votes
2answers
916 views
Bare bones painter app in Java
See the next iteration: Bare bones painter app in Java - follow-up.
I have this tiny program for drawing:
PaintCanvas.java:
...
5
votes
2answers
132 views
Compacting code for World's Hardest Game remake
I was wondering if someone could quickly skim over this for me really quickly and tell me if there's anything I could improve code-wise. What I have right now seems pretty big and clustered, and I'm ...
10
votes
1answer
1k views
Java Snake game
I am a self - taught coder, and have been learning Java / C# for the last 2 1/2 years (inconsistently).
I have recently created a snake game in Java with the help of an online tutorial. I have ...
6
votes
1answer
97 views
UI-based memory game
I have created a UI shown in the screenshot. I am initalizing too many JPanels within a panel in my code to achieve the UI which will lead to bad code design and ...
2
votes
0answers
25 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
1answer
42 views
Checking for a win along the top row of a Tic Tac Toe board
This code works so far and it is a TicTacToe game (Personal Project of Mine). I'm kinda new to programming. My question is I really do not like how the Connected method is at all, because well it's ...
0
votes
0answers
67 views
7
votes
1answer
132 views
Button-clicking UI for a game
I've been working on this game for a couple weeks now as a purely personal project to help myself learn Java. I'd like to know if I'm on the right track with my project.
Items I'd like specific ...
7
votes
3answers
1k views
Simple Hangman game in Java
I'm teaching myself Java and I had some basic questions on how well I am writing my code for readability. I feel like sometimes I'm just writing code that works, and I'm not that proud of myself when ...
2
votes
1answer
1k views
Quiz program in Java
I have made this small quiz with 10 question and 40 JRadioButtons. One question and 4 JRadionButtons for each panel. So I had to ...
4
votes
1answer
77 views
Swing UI to display and edit terrain for a game
I would like someone to review my code and maybe give me some advice to maintain it because I'm still a beginner.
...
3
votes
2answers
222 views
Prime Number Calculator with GUI
I wrote a Java program with a Swing UI that calculates prime numbers. The primes are displayed into a listbox. I used a few optimizations to generate the primes faster. I’m using the NetBeans IDE, so ...
5
votes
1answer
151 views
Extremely Simple Paint Program in Java (Tips for making it run smoother?)
I have written a very basic paint program in java using awt and swing. I have separated the program into two different class files; one of them holds the JFrame and adds a custom panel (this custom ...
4
votes
3answers
233 views
Swing GUI in Java
I'm learning Java at the moment and I'm currently trying to make a GUI using Swing. I've done some reading and people usually prefer and advice to use composition instead of inheritance of e.g. ...
3
votes
1answer
75 views
Basic structure for interactive single window application
This is the basic structure I usually end up with whenever I'm writing a simple application. More recently I've learned about singletons and have started to incorporate them into my design, but other ...
1
vote
1answer
51 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 ...
2
votes
0answers
332 views
Nice GUI for the sudoku solver in Java
I have implemented a GUI for my sudoku solver:
You can use mouse for operating it, yet I have coded moving the cell cursor with keys wW/aA/sS/dD.
My code follows:
...
3
votes
1answer
116 views
Student information demo in Swing using MVC
I've followed several guides on how to implement MVC in Java, and so far I've come up with the classes shown below. From my understanding, MVC follows these guidelines.
The Model should be ...
0
votes
0answers
38 views
Applying MVC design pattern to a Java SWING application
As the title says, for the last couple of hours, I've been trying to implement MVC design pattern into a project I've worked for a couple of days now. It took more time than expected and since the ...