Skip to main content

Questions tagged [swing]

Filter by
Sorted by
Tagged with
1 vote
2 answers
260 views

Suppose you have a panel with a table, which I will call a pane. The table has a toolbar above it, including an edit button. Editing involves showing an editing dialog. It allows the user to edit the ...
Sergey Zolotarev's user avatar
0 votes
3 answers
221 views

Problem: our application allows users to close a form window after certain changes without any confirmation, instead of pressing the Save button. This makes them complain they have to start afresh. We ...
Sergey Zolotarev's user avatar
0 votes
2 answers
617 views

I’m still a Computer Science student, and recently I’ve had to develop a project using the MVC pattern, but without having learned in depth about how it actually works. And it’s not the first time I’...
MasterTJ123's user avatar
0 votes
1 answer
235 views

When it comes to exception handling, there are many guidelines and best practices on the web. On of them is to throw early, catch late, or even Don't Catch. So when facing an exception, the current ...
mperktold's user avatar
  • 151
2 votes
2 answers
417 views

Consider the following GUI screen (Java Swing) with a list of persons where the user can select a person and delete it. According to MVC, the view observes (observer pattern) the model and updates ...
George Z.'s user avatar
  • 705
2 votes
1 answer
135 views

I aim to understand pull model MVC. I'm stuck at defining a model for a simple color-guessing game in Java Swing I chose to practice it. I borrowed the model's initial version from an example which ...
Piovezan's user avatar
  • 481
1 vote
1 answer
286 views

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 ...
Zoran Jankov's user avatar
-2 votes
1 answer
134 views

I am developing a Bank Management Project. Now I am stuck in a point. I want to create a login page where a user will submit his/her username and password then after clicks on the login button, a new ...
Shahparan Rifat's user avatar
-3 votes
1 answer
295 views

I have programmed a Java Swing application. I have some bugs in my program and I want to discover where in the code these errors occurs. With normal code (Non-GUI related code) I apply debugging for ...
jennifer ruurs's user avatar
-3 votes
2 answers
128 views

I'm making a blackjack game, and I want to take my cards images and give each a value for the game. I'm not sure how to determine their value. Should I just do a big switch statement with all the ...
heapoverflow's user avatar
1 vote
1 answer
573 views

I need people opinions on how to improve a code I've written. Let's assume we have an application cataloging movies (~3500 of them) and actors (~1000, but I need to double-check this). Both actors ...
Sandrew Cheru's user avatar
-1 votes
1 answer
801 views

I made a small program using several MVC-patterns. So far I havnt got to much stuff to put in the model so I havnt got any model yet. My idea is to make one MVC pattern for each panel. And looping ...
acroscene's user avatar
  • 119
10 votes
3 answers
36k views

I dont know how to reduce the size of jar file. When we normally code in Java Swing the jar file is created, is there any way to reduce the size of jar file? I can't remove the images and other stuff ...
Rick's user avatar
  • 213
10 votes
5 answers
9k views

I'm making a Book Manager App using Java Swing that allows me to do a variety of things such as opening a txt list of books, searching for books, adding/removing books. There are different classes ...
Lewis Briffa's user avatar
0 votes
1 answer
996 views

I try to create small Java tools to help me at my work every now and then. Usually these do not have to be pretty and I find myself coding a single, sometimes massive, Java class. However, now my plan ...
treiman's user avatar
0 votes
1 answer
220 views

I currently have an program in Java that simulates railway movements. Essentially, trains arrive on platforms, pick up and drop off passengers, and then proceed, respecting signalling where possible. ...
Samuel Front's user avatar
5 votes
1 answer
12k views

For the below sample GUI program using javax.swing, public class UnResponsiveUI extends JFrame{ private boolean stop = false; private JTextField tfCount; private int count = 1; ...
overexchange's user avatar
  • 2,325
4 votes
1 answer
916 views

As per the class hierarchy in java.awt.*, class Button & class Label is-a class Component, and Component is not a Container, which make sense to me. As per the redesign of class hierarchy in ...
overexchange's user avatar
  • 2,325
3 votes
0 answers
2k views

I'm pretty new in Java, but I've done plenty of research and I know what MVC is. However, to implement MVC in Java was a difficult task. I followed this tutorial, which helped me to realise that the ...
user3804927's user avatar
5 votes
2 answers
838 views

For those unfamiliar with the SOLID principles you can start reading here: Wikipedia article. However, most of my understanding comes from: http://www.objectmentor.com/resources/publishedArticles.html ...
Bernard Igiri's user avatar
0 votes
1 answer
85 views

I have a large list of intercommunicating components; so I decided to have one class create all of them and then subsequently delegate them to other classes to facilitate finer tweaking and wiring ...
user2738698's user avatar
1 vote
2 answers
2k views

I have been trying to use classes that implement ActionListener to respond to user input. I'm consistently noticing that for an action listener to communicate the event to other objects, it has to ...
user2738698's user avatar
0 votes
1 answer
220 views

I am building a pair of components that communicates in a one-way fashion: [ JButton ] --> data...process...process...out --> [ JTextField ] The JButton allows the user to select a file and the ...
user2738698's user avatar
0 votes
1 answer
178 views

I have 3 classes: a JButton extension, FButton; a JTextField; and a JPanel extension, FPanel, that would contain one instance of both. The FButton is supposed to open a file, and make the file name ...
user2738698's user avatar
2 votes
2 answers
993 views

In Java, the Swing library implements the Observer/Subscriber-Publisher design pattern to design the way the program responds to events on the GUI (button clicks, etc). The programmer registers ...
Aviv Cohn's user avatar
  • 21.6k
4 votes
1 answer
13k views

Let's say I was working on a Swing application. Most of it is run on the EDT using SwingUtilities.invokeLater() inside the main method, because I heard (please correct me if I'm wrong) that that's ...
Aviv Cohn's user avatar
  • 21.6k
1 vote
3 answers
346 views

I know nothing about gui programming. I try to learn. I have simple question... For example, I have small program. I have class that extends JFrame with main Window (MyWindowClass) and my "logic" ...
pawell55555's user avatar
1 vote
3 answers
4k views

I was hoping for some advice: I need to design a software solution for a medium-sized java / Swing application. The application will have about 200 use cases requiring complex data validation and ...
user111347's user avatar
-1 votes
1 answer
302 views

I have developed a Swing application that controls execution of several scripts like jobs. I need to display the interim output of the jobs concurrently. I have followed MVC while writing the ...
Harihar Das's user avatar
0 votes
1 answer
3k views

I have this Tic Tac Toe game and I thought of this really cool way to draw out the grid of 9 little boxes. I was thinking of putting buttons in each of those boxes. How should I give each button (9 ...
Wumbo4Dayz's user avatar
2 votes
3 answers
2k views

I have a project written using Swing, and I want to make it more smoothly (like JavaFX is) by adding animation to some components(JButton, JScrollPane, JSplitPane) using javax.swing.Timer. UPD: That ...
SeniorJD's user avatar
  • 123
5 votes
2 answers
3k views

I'm developing desktop application in java/swing. I have a component that is registered as a subscriber to many panels and gets messages (my custom event) from them. That component is something like ...
coolig's user avatar
  • 53
3 votes
3 answers
3k views

Java Swing GUI's don't look native by default (Except on Mac OS X for some reason). Swing uses it's own look and feel. You can get Swing to use the system look and feel by putting: javax.swing....
jobukkit's user avatar
  • 217
3 votes
3 answers
370 views

I might be misunderstanding MVC, so forgive me if that is the case. This is my program structure (Java/Swing): I have a JTable (View) that is pointed to by a custom linked list (Model). When the user ...
sinθ's user avatar
  • 1,311
2 votes
1 answer
466 views

It seems to be easier to use and more feature rich than standard swing layouts. It looks like a do it all replacement for all standard layouts. If you are making simple code to just show the time in a ...
david blaine's user avatar
1 vote
1 answer
440 views

I have a form that includes an area for putting in address information and a table that shows the addresses that have been added. I've separated out the ActionListener for the "add address" button on ...
Zack Macomber's user avatar
2 votes
1 answer
1k views

I am trying to understand how a radio button is created in a Dynamic field by reading from an XML using Netbeans 7.0. I know the radio button is created because of the XML being read from database, ...
Nigel Thomas's user avatar
3 votes
8 answers
16k views

I have been trying for years to master Swing layout managers with no success. Every time I need to do something with Swing, it is like pulling nails to get the visual components to line up the way I ...
amphibient's user avatar
  • 1,591
11 votes
3 answers
15k views

I need to write a cross-platform GUI application to process (in multiple threads) and visualize fairly large quantities of data. Ideally the application should be relatively fast and look good. The ...
egor's user avatar
  • 121
2 votes
1 answer
147 views

I'm looking for process-relative information on open-source Swing projects: how the task was described how many developers were involved how much time the solution was taken etc. Are there any open ...
user592704's user avatar
27 votes
1 answer
8k views

I'm currently shipping a desktop Java application. It is a plain old Java 5 Java / Swing app and so far everything worked nicely. Java 5 was targetted because some users were on OS X version / ...
Cedric Martin's user avatar
14 votes
8 answers
14k views

I have a 4 years old project which is written in Swing + SwingX. Currently, it is still alive and still kicking. However, as more GUI related feature requests coming in (For instance, a sortable tree ...
Cheok Yan Cheng's user avatar
2 votes
1 answer
211 views

I have a Swing application with a custom TreeModel that can refer to domain instances. I'm wondering what changes I could make if I consider moving to a web interface later on. Would a pluggable model ...
James P.'s user avatar
  • 1,223
0 votes
1 answer
803 views

I searching for undestanding Docking Framework concept in web, but I don't understand its concept and benefit. I see exist several 'Docking Framework' in java such as Netbeans Platform or MyDoggy or ...
Sam's user avatar
  • 201
4 votes
1 answer
2k views

I've allready created small desktop CRUD applications using Java/Swing. In hindsight I'm not quite sure if the overall design of these applications is good. I've also done some reading on MVC and ...
Regular John's user avatar
4 votes
3 answers
8k views

Why is Swing preferred over AWT? Which Swing component could be used for playing a video on it?
Mohammad Faisal's user avatar
9 votes
2 answers
389 views

I'm trying to design the "main" classe(s) of a Rich Desktop Application based on NetBeans Platform 7. This application will consume HTTP services and, through a "push system" over TCP, will receive ...
Destroyica's user avatar
10 votes
2 answers
15k views

Is there a collection of commonly-agreed-upon design guidelines for separating the Model classes from the View/Controller classes in a Java Swing app? I'm not so concerned that the View/Controller ...
Chap's user avatar
  • 743
1 vote
3 answers
3k views

I'm very tempted to use it purely because of its neat Binding APIs, and now that you're able to use it in conjunction with Swing it feels like a natural progression. The only thing that I can seem ...
Tim Sparg's user avatar
  • 203
12 votes
5 answers
2k views

Today a professor of mine commented that he found it odd that while SWT's philosophy is one of making your own controls by composition, Swing seems to favour inheritance. I have almost no contact ...
devoured elysium's user avatar