Questions tagged [swing]

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

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
67 views

Just a digital clock in Swing

I've written a little clock implementation in Java Swing. It now seems to work flawlessly after having terrible Swing specific timing problems. Please indicate if this is the way to draw the clock and ...
4
votes
0answers
852 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 ...
4
votes
0answers
61 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
8k 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
60 views

MIDI editor application

Source I made a project for a class, a MIDI editor written with Java 8 and Swing, and continued working on it on my own. However, I ran into a problem I couldn't solve and gave up. I'd like feedback ...
3
votes
0answers
57 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 ...
3
votes
0answers
865 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
97 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
224 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
65 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
90 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
0answers
486 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
102 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
374 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 ...
3
votes
0answers
62 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 ...
3
votes
0answers
69 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
47 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 ...
2
votes
0answers
87 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
0answers
438 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
9k 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
212 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 ...
2
votes
0answers
420 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
789 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
834 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
243 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
101 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
27 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
56 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
269 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
681 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
62 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
104 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
392 views

Notepad Clone Text Editor

...
1
vote
0answers
48 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
212 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
1answer
83 views

Correct use of Serializable with lambda functions

I'm practicing saving and reading serializable objects when a friend told me serializable objects have no use in real life, that I'd better focus on JSON or XML to serialize my objects when I came ...