Questions tagged [swing]

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

42 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
106 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 ...
5
votes
3answers
492 views

Organizational Tool GUI with Java Swing (and GridBagLayout)

My first 'large' project is to create an organizational tool. Right now, it's pretty basic, but nevertheless functional in terms of the intent of the current release (v0.3.0). My main question is: '...
4
votes
0answers
53 views

Sierpinski Carpet using Seesaw

I decided to write a Sierpinski Carpet generator. This has been something I wanted to try since watching the Coding Train this summer. A screenshot of it in action with some experimental coloring: ...
4
votes
0answers
6k views

Simple MVC CRUD with JDBC

I would like to review my simple piece of code. I am beginner (I learn java for 1 year) and I would like to find out whether I am on good way. I have created simple MVC CRUD java app "ProductManager"....
3
votes
0answers
122 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. ...
3
votes
0answers
87 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
0answers
114 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
0answers
59 views

Swing framework removing cyclic dependency between UI and Controller

I am creating a Java Swing Application which deals with Geographic and Stellar data and I need a solid framework on which I can build (now) and extend (in future) any functionality I wish to. I am ...
3
votes
0answers
82 views

Game of Life in Java using Swing

As a hobby project I implemented Game of Life in Java using Swing. I don't have much experience with Java using Swing and would like to get feedback on the code. One thing in particular that I would ...
3
votes
1answer
255 views

Updating the icon of every JLabel in a JLabel ArrayList

I want to update every icon of a JLabel ArrayList, to its own individual icon based off of an outside ...
3
votes
0answers
381 views

Java Pong Game Using Swing

I've written a Pong game in Java using the Swing library, and while the code works, the ball seems to lag across the screen. Perhaps my code is inefficient. I've included only the Board class because ...
3
votes
0answers
96 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 ...
3
votes
0answers
68 views

Change an identifier in a .csv file, based on another .csv file

I have only dabbled in Java before (my previous experience being mostly with PHP and JavaScript) but a request come through for a small application that seemed like a good chance to get some ...
2
votes
0answers
180 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
78 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 ...
2
votes
1answer
631 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 ...
2
votes
0answers
352 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 ...
2
votes
0answers
326 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 ...
2
votes
0answers
58 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 ...
2
votes
0answers
5k 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: ...
2
votes
0answers
362 views

Model view controller

I will be implementing MVC model in my program but before that, I have done a simple program based on my understanding of the MVC model. I have three pages: The user will enter a value in page one ...
2
votes
0answers
69 views

Knowledge Catalogue

All that the program does is query a database that I have setup, when the user selects the returned fields, which are populated based on the selection of the field above it. The application is ...
2
votes
0answers
730 views

XML to JTree app needs Model/View/Controller refactoring

I'm developing a JavaSE-1.7 Swing application that displays XML files as a JTree. This will be the base for further work, e.g. filtering nodes. My questions, as a ...
2
votes
0answers
812 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 ...
1
vote
0answers
53 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
0answers
124 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
78 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
0answers
41 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
1answer
369 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. ...
1
vote
0answers
26 views

Cleanly preventing flashing an element from corrupting future flashes

For a Seesaw (Swing) app I'm writing, I need to be able to flash a component for a certain duration. Here's the basic function I came up with that accomplishes this: ...
1
vote
0answers
55 views

Modification suggestion for Simplification game

Sorry for any confusion but I could only came up with the name Simplification. This game displays a simplification problem and the user has to solve it using BODMAS rule. The user will get 1 minute to ...
1
vote
0answers
142 views

Adding JComboBox(s) to a JTable

This question is in continuation of my previous question I asked here. I'm trying to dynamically add JComboBox(s) to a JTable ...
1
vote
0answers
525 views

Sticky notes in a Virtual JDesktop

I made a very practical program consisting of a virtual desktop with a right-click pop-up menu that brings up a button to open a 'stikinote.' These 'stikies' are simply little note-windows where text ...
1
vote
0answers
59 views

URL encoder with MVC Pattern

I coded a little URL encoding tool to exercise the JAVA MVC pattern with SWING. Can somebody give me feedback if this is the right way to implement the MVC pattern? ...
1
vote
0answers
82 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. ...
1
vote
0answers
346 views

Notepad Clone Text Editor

...
1
vote
0answers
47 views

Removing JLabels by pressing JButtons which disable if in excess

The goal of this code is to move some JLabels from (JLabel[] pileone) off a JFrame when a ...
1
vote
0answers
62 views

JAX-WS client to accept server certificates

I am building a JAX-WS client with a GUI that connects to a server by accepting self-signed server certificates (when it uses HTTPS). The accepting of the certificates is not automatic, it is similar ...
1
vote
0answers
202 views

MVC Swing Application

I want to make sure this is a good implementation of MVC. I started earlier with this code found here and it was horrible compared to what it is now. If it is a good implementation of MVC what, are ...
0
votes
0answers
127 views

Basic Connect Four Game [Follow Up 1]

Here is an updated version of a basic connect four game I had posted previously. Changes include: an overhauled validator, simplifying the process by knowing where the last move was made Utilized an ...
0
votes
0answers
20 views

Salesforce Live Agent Chat Client Code in Java

I have to use SwingWorker for the first time today, and I'm pretty pleased with the result. Would you mind helping check that I used it correctly? My class starts ...
-2
votes
0answers
35 views

jLabel painting performance

I'm using jLabels to show messages with icons. But labels are delaying to load or paint. So I want to increase the performance. ...