Swing is the name for the GUI toolkit that is packaged with the standard Java SDK. (since 1.2)

learn more… | top users | synonyms

4
votes
0answers
20 views

Replicating a file system

The goal of this is just to practice. I went off on a self-challenge to replicate something(So the names of the parts can be ignored), I'm not done yet (Though what is here is fully runnable), but ...
3
votes
1answer
31 views

Simulating a GUI windowing system - follow-up

The previous and initial iteration at Simulating a GUI windowing system I have essentially cleaned the code based on the only answer. Now I have: MyCanvas.java: ...
9
votes
1answer
419 views

Beginner text editor

I wrote a simple text editor and I would like to get some critical comments. Below I present only a main part of code. I removed icons, irrelevant functions, etc. I am aware,that JTextArea is not best ...
9
votes
1answer
85 views

Hangman game using Java 8

I’ve been getting used to Java and I’ve written a simple hangman game using event-driven programming in Java 8. Please let me know of any improvements regarding the readability and design of the ...
3
votes
1answer
97 views

GUI flashcard program in Java

I'm new to Java and I've written a flashcard program in Java 8 that allows the user to create a collection of flashcards and then test themselves using those flashcards. Please provide any ...
5
votes
1answer
28 views

Determining prices for wholesalers or retailers

It is my first year in college and I have designed a code using pretty much my own basic knowledge. I have designed a program to work out the price of items for wholesalers or retailers. Special ...
4
votes
2answers
62 views

Program for a packing company

It's my first year in college studying Java so please excuse my ignorance in programming. This is my 5th Task in my Sequential Programming assignment, where we had to design a program for a packing ...
10
votes
0answers
103 views

Simple Java Wizard

Working on a project, I encountered a need to create a wizard and when I ran into the need for a second, slightly different wizard, I generalized into these classes. I originally based it off of this ...
2
votes
0answers
44 views

Simple Java MIDI player followup

This is my second iteration of a simple Java MIDI player. I've made several amendments and would like to see if the code is now correctly implemented and readable. This follows on from the first ...
6
votes
1answer
51 views

Simple Java MIDI player

I created a simple program that allows you to create and play MIDI sounds. I've used the MVC approach and I’d like to know if there are any improvements to be made regarding the design and structure ...
2
votes
2answers
49 views

Timer for a Java game

I have a simple game that implements a TimerTask. However, when there's a popup using JOptionPane the timer task doesn't seem to ...
7
votes
2answers
93 views

Simple calculator implemented with lambdas

I was searching for a way to exercise the Java 8 concepts I've been learning, especially pertaining to Lambdas. Incidentally, I hadn't used any swing in a while and wanted a refresher. This is the ...
7
votes
0answers
64 views

Creation of Queen Ann's Lace fractal

I've created a program which recreates the Queen Ann's Lace fractal. However, when the amount of points that are being plotted increases, the points are plotted way slower. Is there any way to make it ...
10
votes
2answers
119 views

Factman - A two player numbers game

I'm not sure if anyone else has ever heard of Factman, or even where the name comes from, but my AP Computer Science teacher calls this project Factman, so that's what I'm going with. Naming aside, ...
6
votes
2answers
166 views

TicTacToe GUI needs optimizing

I've been working on a TicTacToe GUI. While the game works with a proper restart, exit and win conditions; I feel that it could still be better optimized. I'm not particularly concerned with the ...
5
votes
2answers
125 views

Java MVC model for large scale GUI using annotations

I'm trying to make a good MVC model using annotations, which I will use it in a large scale GUI project. I want to respect the maximum of rules and guidelines, and be able to decorrelate every parts ...
9
votes
3answers
277 views

Workout tracker

Around June of last year, I made my very first GUI 'app.' Wish I knew of this amazing site then, I thought for posterity's sake it would be great to get it reviewed. It's a simple I/O window just to ...
4
votes
1answer
166 views

Start of Login and Address book GUI in Java

In GUI that provided with the right username and password lets you open up an address book like GUI where you have crud like operations. I'm still very inexperienced with swing facilities especially ...
11
votes
2answers
547 views

Add JPanel to JFrame

I just finished a fairly easy homework assignment. Basically all I had to do was add six JPanels that were just text boxes with color names as the text. However, ...
8
votes
2answers
190 views

Slide-Game in Swing

This was done as an assignment in school. As I am still learning some of the basic parts of Java be merciless when it comes to my code. As it is an assignment, some things are unchangeable. The ...
2
votes
0answers
56 views

Graphical Flowchart Programming

This is an incomplete implementation of something similar to scratch. It's incomplete because right now, I'm working purely on the user interface. I used Swing to make the basics of it, but then ...
7
votes
1answer
133 views

Sorting Algorithm Visualizer

Over the course of the past month I've worked on a little visualizer to show how different algorithms are sorted. I'm pretty happy with how it turned out but would be interested in any feedback ...
8
votes
1answer
84 views

Simulating a GUI windowing system

I was eager to learn the implementation details behind windowing GUI systems. Because I am mostly a high level programmer having not much experience in low-level stuff, I had to simulate it instead of ...
5
votes
3answers
300 views

Multiple random falling objects animation in Java

I am new to programming but I tried to make my code as readable as possible! Hopefully you can see what it does before you run the program. I did not implement a ups or fps controller, the animation ...
5
votes
1answer
54 views

JFrame with four sliders

I am writing a control panel with Sliders but I think my code is messy and cumbersome, what can I do to improve it? ...
5
votes
2answers
153 views

Inserting values of Date type into a MySQL database

I have got a JTable implementing a TableModel interface. There are ID (primary key, ...
5
votes
1answer
81 views

Macroing program with Java

When you press CTRL you activate the "Register" mode. In this mode, when you click, the program stores the X and Y of the mouse. To turn it off, you press CTRL again. When you turn "Register" mode ...
2
votes
1answer
121 views

Using a List to manage Swing event listeners

I've been playing with an idea for simplifying management of event listeners on custom Swing components. Swing provides the EventListenerList class for maintaining events, and every JComponent has a ...
8
votes
1answer
192 views

Number Memory Game (JApplet)

I coded a JApplet game that allows the user to play a game that displays a sequence of 4 numbers that must then be input into a ...
3
votes
1answer
158 views

Adding action listener to Swing JButton

I'm aware that there are existing questions about JButtons, but I haven't found anything that's asking exactly what I'm trying to figure out. I inherited a Java ...
2
votes
2answers
166 views

Database assignment with MySQL and Swing

I have completed this assignment from Stanford CS108 on MySQL and Swing (it's part B). It would be wonderful if someone could point out my weak spots in the code and overall design. I have uploaded ...
4
votes
2answers
151 views

Small password generator app with GUI, v2

GUI-based pseudo-random password generator. Modification of this app, improved according to suggestions from Code Review users. Additional feature: calculation of time to crack password on average ...
10
votes
4answers
433 views

Chess Architecture

I am currently developing a chess game but have made the mistake of putting all my Java code in one .java file. I need help cutting up my code into more manageable chucks. Could someone show me how ...
2
votes
1answer
53 views

Initialisations for applet

I have the following code in my class and its init() method. It works fine as it is but I'm wondering if there's a better way to do this so that my init() and ...
3
votes
1answer
86 views

Swing application: Working with GridBagLayout and Mediator pattern

SCENARIO: As a follow-up of this question on Stackoverflow asked few days back, I am working on a swing application(article tagging tool) where the user(on an initial jpanel) would fill up some ...
3
votes
1answer
929 views

MySQL Java in JTable

This is an assignment posted here. (Part-B) The aim here is to create a GUI in which the user can search for and insert data into a particular table of a MySQL database. Is this an appropriate ...
13
votes
5answers
1k views

Small password generator app with GUI

This is a GUI-based random password generator, which supports internationalization. It consists of 6 small classes: Main classes: Application - entry point ...
2
votes
2answers
354 views

Using database connection and GUI

In my project there are a lot of GUI so I have a class for each GUI. I created a class to connect to my db (MySQL). Remember, I don't have problems with code not working. The code (important to this ...
4
votes
1answer
159 views

Simple Cellular Automata (think Conway's Game of Life) simulator

Firstly, let me say that this code works, as posted. It fills a 10x10 grid with a random color (black/white) then runs a cellular automata simulation on the grid, starting or pausing when the button ...
7
votes
1answer
170 views

Pokemon Type Evaluator part 2

I started anew and completely refactored the way I implemented Pokemon Type Evaluator. Also, first use of a lambda expression (Case of using it, but still don't fully grasp how it's working). I'm ...
8
votes
3answers
960 views

Simple FizzBuzz

I wanted to try FizzBuzz, but to do it in the most efficient way. I think this method employs most of the concepts I learned here. Is there anything unaccounted for? A sprinkle of Swing since that's ...
6
votes
2answers
111 views

Reorganize a maze game from one large class into smaller classes

I'm new to Java and I really don't understand how to make more classes work like one. So if anybody could explain and help me divide my large code into smaller classes (like Player.java, Main.java, ...
10
votes
7answers
1k views

Too-high / too-low guessing game in Swing

I have created this program and it works fine. It's just that its too wonky and huge so I was wondering if anyone knew how I could shorten the program so I didn't have to put all of these into each ...
7
votes
1answer
92 views

Determine maximum window bounds

Preamble: the default frame positioning with Swing JFrames has always bothered me. Eventually I wrote some code to calculate my available desktop space, not ...
12
votes
3answers
1k views

Pokemon Type Evaluator

I thought I would apply what I learned to make something fun. Its purpose is to type check Pokemon, for anyone familiar with the series. It mostly works but I have two concerns: Sometimes you write ...
5
votes
1answer
132 views

Pausing a SwingWorker with a Timer

I made a SwingWorker which is fetching tweets using the twitter4j API. The twitter API will allow 180 queries every 15 minutes, and then throw an exception with ...
2
votes
1answer
219 views

Opening contents of a file using Swing and SwingWorker class

I want to open a file contents using swing. For this I used the SwingWorker class. This application took more time (more than a minute) to load a large file ...
4
votes
1answer
89 views

Creating a “Produce and Consume” using Swingworkers

I am experimenting with the produce and consume concept while trying to incorporate it into my own project. I basically have two Workers in a small example I made: ...
2
votes
1answer
210 views

Breaking memory game code into MVC form

I am currently coding a memory game whereby upon the game starts with 14 cards displayed faced down. The player will start by clicking on 2 cards. The cards will be revealed. If both of the card ...
5
votes
1answer
94 views

Periodically checking for internet connection

I have a SwingWorker which checks periodically for an internet connection and updates a jLabel accordingly. ...