Swing is a GUI toolkit packaged with the standard Java SDK since version 1.2.
3
votes
0answers
26 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 ...
1
vote
1answer
30 views
Java Swing Calculator [closed]
So i made this code with my friend, but we are having some problems we want to have the "C" button clear the text everytime which it does, unless you have already typed in a problem. Anyway let me ...
1
vote
0answers
12 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
442 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
118 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
60 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
71 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
88 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
35 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
48 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
82 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
32 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
199 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
35 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
91 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
114 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
51 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
54 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
133 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
100 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
43 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
912 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
126 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
629 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
80 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
22 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 ...
1
vote
1answer
37 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
58 views
7
votes
1answer
124 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
972 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
514 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
176 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 ...
4
votes
1answer
101 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
212 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
72 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
46 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
232 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 ...
3
votes
1answer
102 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
35 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 ...
3
votes
2answers
113 views
Basic TicTacToe game in java
I was assigned to create a simple Tic Tac Toe game in java for class, and here is what I got. I would like to know how the code could possibly be shortened without using really advanced topics since I ...
1
vote
1answer
39 views
Creating a new JFrame on label click
So I've been looking for examples on the internet for a while now and this seems the most common way everyone is suggesting, but now I ask is there a better way to make a new jframe pop up on click ...
3
votes
2answers
393 views
Medical diagnosis selector
Alright, so my code is 'all over' and missing some fundamentals as regarding to the MVC design pattern.I should separate my concerns and I don't have a model layer and i'm clueless to how to implement ...
5
votes
2answers
192 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) ...
6
votes
2answers
142 views
Create generic HTML calendar
I maintain our organizations intranet page as an additional duty. One thing that every department in the organization likes to use is calendars -- upcoming events, training, etc. At first I was only ...
1
vote
2answers
83 views
Java Swing Text Editor
Creating my first program in Swing and I was hoping to get some feedback. I'm looking for constructive criticism and tips for my swing code and my code in general. Don't really know what I'm doing so ...
3
votes
1answer
130 views
Java Swing Pong game
I recently created pong game using Java. This is my first time not copying any code from the internet or using any help. While it does work, my code feels well written but no streamlined or smooth (...
4
votes
1answer
68 views
Piano Tiles-like-Game: Mouse LorMorR
I'm currently trying to get somewhat familiar with swing and so I made a little game called "Mouse LorMorR" (Mouse Left or Middle or Right). The game consists of a timer, a score display and three <...