Questions tagged [swing]

Swing is a GUI toolkit packaged with the standard Java SDK since version 1.2.

Filter by
Sorted by
Tagged with
3
votes
1answer
78 views

Game of life GUI simulation using java.swing

I am fairly new to GUI programming and I am interested in improving my code from every aspect. Performance, security, readability, conciseness, and the look-and-feel aspects are all important to me. ...
7
votes
1answer
101 views

Chess application with GUI and AI in Java

I've included the files that I felt were relevant (i.e I haven't included the individual pieces in the inheritance hierarchy). I'm particularly curious as to whether the system as a whole is ...
1
vote
2answers
52 views

College Billing System - Java

I developed a college fee report generator application using Java with internet as referance,but now I need you guys help in making it more obvious and a sturdy application as I am a rookie to Java ...
1
vote
1answer
71 views

JTextPane with line-numbers

What I wanted to do As part of a larger project, I needed a simple text editor with line numbers. The editor should also be able to highlight the current line (line number in bold) and define the tab ...
1
vote
1answer
108 views

Sudoku-Solver with GUI - follow-up

Background A few months ago, I asked this and this question on my implementation of a Sudoku-Solver. I now tried to further improve this little project. Changes Minor GUI-changes Input validation "...
2
votes
0answers
44 views

Is it bad practice to update Graphics in Swing outside of paintComponent like this?

I'm currently implementing a Minesweeper clone in Java using Swing. Rather than updating the tiles like so ...
6
votes
1answer
273 views

Minesweeper with GUI

I created the famous Minesweeper-game in Java, for which I used java-swing to create the GUI. Here's the code: Control.java: This class contains the main-method, ...
1
vote
1answer
79 views

Timer in Java with GUI

I have created a timer with GUI in Java. Here's the code: ...
7
votes
1answer
121 views
2
votes
2answers
106 views

Langton's Ant in Java

I've wrote a simulation of Langton's Ant in Java, and hope you have some suggestions to improve the code. The class Control.java contains just the main: ...
1
vote
2answers
538 views

Java Calculator with GUI

I've wrote a calculator in Java with a GUI using swing. Here are the classes: Control.java: ...
3
votes
1answer
107 views

Sudoku-Solver - follow-up

I've now tried to use the suggestions you can find here to improve my Sudoku-Solver. Here's the updated code: ...
6
votes
2answers
79 views

Pong-Like Game. First game I ever made. advice needed

This is my first time ever making a game. It is a pong-like game, where the user has a paddle and has to prevent the ball from passing them. Since this is my first game, I want any recommendations/...
4
votes
1answer
300 views

Sudoku-Solver with GUI in Java

I've wrote a Sudoku-Solver in Java, which also contains a GUI, so you can just enter the Sudoku, press "OK" and it will solve the Sudoku using backtracking. Here's the code: ...
5
votes
2answers
127 views

Java implementation of Conway's Game of Life with GUI

I've implemented the Conway's Game of Life in Java, including a GUI. Here's the code of the two classes I wrote: GameOfLife.java ...
3
votes
1answer
103 views

java swing super simple calculator mvc

i am trying to learn mvc (model view controller). there are many texts out there explaining what mvc is. but not many explaining how to actually code mvc. i found a bunch of questions here asking ...
3
votes
0answers
51 views

Controller class for an input dialog

I am learning OOP, concretely Java, by developing a real life business application for aimed for repair shops. I have followed MVC pattern design for GUI elements of my application. I was wondering do ...
1
vote
2answers
114 views

Fruit machine game

I'm a beginner in Java, and this is the first time I have written a program from scratch without a guide explaining how and where to create classes etc. Please review my code to see whether the ...
2
votes
1answer
98 views

How to properly write code for Java Swing

basically I'm learning Java Swing by myself and I'm wondering what is the correct way to wrote code for it? I don't want to have a big class with everything in it and I want to do in the most "correct"...
2
votes
1answer
53 views

GUI for counting the number of times a word is said (with added features)

Some background: The counter was first made as a joke because we have a lecturer who repeats the 9 phrases found in the program over and over during lectures and I thought it would be funny to create ...
3
votes
1answer
97 views

MVC pattern in my Repair Shop application

I am currently learning Java programing by building real life business application for repair shops. I am posting this code so I can get critical review, and change my application architecture if ...
4
votes
1answer
82 views

Single-player obstacle-avoidance space game

I was wondering what I could do to improve the gameplay of this game, as well as the graphics. I would like to use LWJGL, but the rendering library isn't important. I just need to find out ...
1
vote
1answer
523 views

Simple Connect Four Game With GUI added

I am trying to improve my coding skills in Java by taking existing code, studying it, and adding on to it. In this code example, I took code from Connect Four game in Java and edited it. The most ...
5
votes
1answer
127 views

Java program to encrypt/decrypt text

I am working on adding a GUI to the project that I was making in some course. I am curious if the layout looks good, if there variables and methods are shared properly between particular classes, if ...
3
votes
1answer
115 views

Very simple Hangman game, with a Swing GUI added

I have just started learning basic Java. I would like to know what I can do to improve my coding habits in Java and how to code more efficiently. In this code example, I took code from Very simple ...
3
votes
0answers
481 views

Java implementation of Spider Solitaire

I recently cloned a classical Spider Solitaire game from Microsoft Windows XP. I implemented almost all features of the game. Please tell me anything I can do in order to improve my coding style. ...
4
votes
1answer
117 views

Java Mandelbrot Set Viewer

I'm writing my own version of a Mandelbrot set generator, with pan and zoom functionality. (There's not yet a color overlay of sets generated with various beta values; the beta value is changed ...
1
vote
1answer
53 views

Caret color and movement animation in Swing

I'm developing a new Look and Feel that is based on animation , so I've decided to make animated text caret too ! The caret works as expected every thing is fine except that am worried about how I ...
3
votes
0answers
93 views

Java game: select numbered tiles to form a goal sum

This is a homework project (Soft. Eng.) which I have completed. My teacher gave me a 91, but I am unhappy with this grade because my code is quite messy. (Please excuse incomplete Javadoc, the code is ...
3
votes
1answer
38 views

Mortgage calculator with Swing for Helsinki MOOC

New to Java, just finished the Helsinki MOOC course. I programmed a basic mortgage calculator as my first solo project and while it works, I have a few questions about coding style: The listener and ...
2
votes
2answers
884 views

Java Swing Exercise: BMI Calculator

This is my first question here and this is my working Body Mass Index Swing Calculator. Any improvement or recommendation is welcome. ...
2
votes
2answers
2k views

Minesweeper game in Java using Swing GUI

I created a Java Swing Minesweeper, for which I would like some feedback. Note : I'm just in high school so please excuse any 'dumb' ways I may have coded certain segments. Any tips or books on how ...
3
votes
0answers
164 views

Forest Fire Cellular Automata

I stumbled on the idea of a Forest Fire simulating cellular automata, and decided to try making a version using a full Seesaw UI (a Clojure wrapper over Java's Swing). A short sample of it running is ...
3
votes
3answers
191 views

Writing a calculator in idiomatic Java

I just dipped my toes in Java today (coming from C++) and made a few things to learn it. The standard stuff like Atari Breakout, Tic Tac Toe and this calculator. This has been done so many times ...
-1
votes
3answers
151 views

A Java Calculator that could perform basic Mathematical Operations [closed]

I've been working for few days to develop a basic Java Swing Calculator that could Add, Subtract, Multiply or Divide two numbers and also has other options like inverse(1/x) and square root I would ...
1
vote
0answers
186 views

Snake animation in Swing

I'm developing a simple Snake game in Java using Swing. So far I made the snake animation which is troubling me: when the snakes moves it seems like it starts to lag for no reason, but when I move it ...
1
vote
0answers
88 views

Java Swing “guess my number” game in Hexagonal architecture

Based on this article, I wrote a small "Guess my number" game in Hexagonal architecture which interacts with a Java Swing GUI adapter. Any feedback is appreciated. Main.java ...
1
vote
1answer
62 views

Keypress output to screen

For a school project, I had to make a keylistener that would output whatever you typed to the screen. A JFrame would be initialized to have the focus required for the listener to work. It uses delete ...
2
votes
1answer
96 views

Java League of Legends ping checker

I'm still a freshman and this one of my first projects I made using Java and Swing. The program is a simple League of Legends multi-threaded ping checker that pings the server 10 times to get an ...
1
vote
2answers
412 views

Tic Tac Toe Java Swing game

I just created a simple game. Now I'm thinking what could be done better here. I want to get some tips how to make the code better/easier or what to add to it. Code: ...
2
votes
0answers
543 views

Mouse wheel scrolling for nested scrollable Swing components

By default, mouse wheel scrolling in Java Swing behaves differently than in web browsers. In Swing, when you have an inner scrollable component and an outer scrollable component, the mouse wheel ...
2
votes
0answers
85 views

My first Java app: a calculator in Swing

I have created my first Java app. I am very familiar with C++ and thus without reading any books (just introduction, googling and IntelliJ auto-completion) I directly jumped into Java. So I made a ...
3
votes
1answer
203 views

Sorting an array of numbers in Java with an algorithm

This is pretty much one of my first programs that I have created in Java and I just wanted to ask if anyone sees some obvious errors or mistakes I made. The purpose of this program is to sort numbers ...
1
vote
2answers
989 views

Using decorator and strategy pattern for dynamically generating SQL queries

This is a link to my application that actually runs on the design specified in the image. The idea behind the image is that the SubjectInfoViewer behaves as the ...
2
votes
1answer
1k views

Simple Java OOP calculator with GUI

I'm learning Java and I've tried to write my own calculator with GUi based on this post. Here is the repo: https://github.com/MurDaD/java-calculator Could someone check my code and tell me how to ...
1
vote
1answer
655 views

Swing GUI application to change colour of circle with JSlider

The below code works as intended and I'm generally happy with it - the sliders each change an RGB value to modify the color of the circle in circlePanel. Likewise the diameter slider changes the size. ...
4
votes
1answer
121 views

Simple view for CRUD with miglayout

I have created the following view extending the JPanel class, the objective of this view is to allow the user to perform 3 CRUD operations create,delete and modify on the entity "Attribute", this ...
0
votes
1answer
169 views

10 minute Tic Tac Toe

After seeing Snake coded in 10 minutes, I decided to try a similar challenge, albeit easier. The following is Tic Tac Toe that I coded in 10 minutes. Given the short time frame, I'm sure there are ...
0
votes
1answer
800 views

Java Multi-threaded Chat Room

In an attempt to learn more with Java, I decided to challenge myself by creating a GUI-based, multi-threaded chat room. Currently, you run the Client and it prompts you to either create or join a ...
1
vote
0answers
91 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
2 3 4 5
8