java


Java Gui empty frame


I am currently developing a project with a genetic algorithm.
It works fine, I get the results I wants, so no problem on this side.
I displayed all the information in the console so I decided to create a GUI to improve the software.
I have two frames. One is a selection frame where you select your options for the run.
The other is a frame with a textArea. The purpose of this second frame is to display the information about the run in it. For both frame I used the MVC design pattern. It works fine, I have run some tests for the GUI and all is displayed normally.
Now the problem is when I try to integrate the two sides.
I launch my first frame in the main. Then it switch to the second frame and run the Genetic algorithm when the information are complete and the user clicked the OK button. I make verification of the information and let the button enabled false until it is correct ;).
In theory it is suppose to display the second frame empty then launch the GA then input text in the frame dunring the run with the MVC model.
The problem happens when I click the button, the second frame display partially. I mean I have the frame with the title and the red close button but there is nothing in it. I can move the frame with my mouse but if i click the red close button, nothing append, so I guess the frame is kind of freeze. The Ga run perfectly during this time. At the end of the
GA's run the rest of the frame appears with all the information that should have been input in it. So the Mvc model is working good. It is just the frame that don't display normally.
I use the following code :
Vue2 vrga = new VueLorsRunGa(); //create the 2nd frame
vue1.dispose(); //destroy the first one
//code to run the GA
I am not use with the GUI so maybe I made it wrong and so I don't free something needed.
If we take it sequentially, the vue2 is supposed to be totally launch before the ga code is executed. But i read in a article that the GUI's things are managed in a special thread. And so it not suppose to be freeze by the GA ... The GA got its specific threads but I haven't done any for the GUI.
So if anyone had a idea where I can be wrong or how to managed to suppress my bug, it would be great :)
Thank you for help
Scyn
You are probably running your code in the EDT thread (like directly from the actionPerformed method) which blocks other events being processed.
You should move long running operations out of the EDT thread

Related Links

Efficient handling of mouse clicks
Right syntax for concat on derby
Break 2 loops if condition satisfied in Java [duplicate]
Simple Java currency converter errors
Vert.x Json.decodeValue list
Auditing with spring-data-mongodb
Unable to save screenshot at desired location
Oracle, unique constraint violated on Hibernate insert
why java Math.pow arguments double?
How to store values in an array after performing split()?
How to validate the contents of the object stream before deserializing?
Deserializing json from retrofit using jackson where same variable name can represent two different objects
Casting generic to subtype
Getting authenticated username in servlet running in WebLogic 12c
USSD code generation on phone using Java
How do I add data from CSV file to an array made of strings in Android Studio?

Categories

HOME
pandas
asp.net-core
listview
openstack
layout
bpmn
jsp-tags
maven-3
amortized-analysis
leon
infragistics
sqlite3
dxl
ravendb
serverspec
add
python-unittest
user-input
fallback
graphlab
pythonanywhere
custom-wordpress-pages
tokenize
nouislider
semantic-versioning
titanium-mobile
noraui
stringtemplate
restlet
qwerty
hue
leading-zero
squib
mapzen
ruby-on-rails-3.1
dynamic-reports
nomethoderror
flashair
reactive-cocoa-5
businessworks
prolog-setof
alphabet
typescript1.8
slickedit
media-player
flutterwave
iso8601
dwscript
topbeat
objective-c-swift-bridge
trash
simplewebrtc
captivenetwork
suffix-tree
phpcas
natvis
ios8-today-widget
security-testing
oberon
rake-task
jsonpickle
network-interface
javafx-webengine
onactivityresult
google-reader
responsive-slides
elliptic-curve
p4java
jquery-layout
wp-query
concurrent-collections
algebraic-data-types
mysqltuner
ms-project-server-2010
dir
quartz-graphics
html4
eventlistener
gdata-api
jspinclude
nsdatecomponents
horizontal-accordion
javax.script
sql-server-profiler
mongomapper
libs
ajax-forms
caching-application-block

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App