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

How to change the style of a normal pane (Not layout pane)
How to access the String value inside the object using retrofit 3
Can we use sendKeys(Keys.RETURN) ,sendKeys(Keys.ENTER) and sendKeys(Keys.SPACE) to click button or select checkbox
Spring cannot find key store file
Add small icon in Notification Icon
Avoid hardcoding messages in java classes
Write an input validation loop that asks the user to enter “Yes” or “No”
Waveform of an audio and trimming with start-end point
How do Spring property placeholder default values work?
LWJGL moving/rotating objects
Using my login system in Javafx with FXML? [duplicate]
Using ViewFlipper to change views with motion event
java.lang.ClassCastException: android.support.v7.widget.RecyclerView cannot be cast to android.support.design.widget.FloatingActionButton
JDBCRealm FORM based authentication not redirecting to login page
Print Linkedlist with 2 integers per node
Android Studio: Failed to create MD5 HashFile

Categories

HOME
java
compiler-construction
ionic-framework
bluetooth
wso2
openmp
deezer
heroku
reserved
rsync
sqlite-net-extensions
v8
survey
disassembler
windows-server
slurm
maude-system
rascal
collectd
fortumo
seaborn
transformation
evopdf
firefox-webextensions
autocad-plugin
xlsxwriter
sylius
firebase-crash-reporting
crosstab
java-7
vlsi
tdd
buck
bpel
lightswitch-2013
titanium-mobile
repo
uiswipegesturerecognizer
language-concepts
git-merge
bitbucket-pipelines
swisscomdev
hot-module-replacement
splice
temporary-files
mapzen
ruby-on-rails-3.1
arena-simulation
heightmap
businessworks
rainbowtable
osx-mavericks
smartcontracts
appcompat
network-flow
jquery-validate
np-complete
nsarray
gnome-shell-extensions
objective-c-swift-bridge
angular-strap
time-and-attendance
abcpdf9
instant
gridview-sorting
lttng
actionbardrawertoggle
rvest
cloudbees
pervasive-sql
intel-fortran
lib.web.mvc
embedded-code
emailrelay
ideamart
skos
lustre
c++03
offloading
nstableviewcell
mdt
client-side-templating
heisenbug
aapt
jquery-layout
mechanize-ruby
transcoding
app42
intentservice
cdc
jmapviewer
ftps
dotnetnuke-5
interface-orientation
isnullorempty
cascalog
jspinclude
enter
punbb
nsdatecomponents
self-extracting
file-comparison
krl
fluent-interface
sudzc
coda-slider
mozilla-prism
xsdobjectgen
multi-tier
photoshop-cs4
javap
backcolor
aquaticprime
zune
windows-live-messenger

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App