Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Gabrielle Gabriel

Greenhorn
+ Follow
since Dec 17, 2014
Gabrielle likes ...
Mac Linux Windows
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gabrielle Gabriel

Lol ok thank you anyway for your answer and tip^^
7 years ago
Thank you Tim!

Well it's part of a training for my job.
Is javaFx easier than swing? it could be good to know for another project. So thanks for the tip^^
I still wish to finish this project with swing because i got really far with swing and used lots of time on it.
7 years ago
Hello ladies and gent,

I've been trying for a while to use swing (not a huge fan though, why does it have to be so complicated...)
After having lost a few hair on the esthetic of my gui, i am now trying to use oop for taking care of events (all of this in a MVC app of course)
I still don't understand how to update a view when the user makes an insertion in the db (sqlite with jdbc here) but that's another topic.
For now, (i hope i'm quite clear) i want to be able to encapsulate event functions in other words i wan't to avoid things like that:

I'd rather have a function that could for example take a JButton or in my case a JComboBox and a JLabel as a parameter and get selected item from this combo and use it to put the result of the db request from the selected item of the comboBox into the JLabel. (still here?)
Also i'm still not sure i really get how to use action listener and stuff (i mean how to filter events to know which event has been done and when...)


I tried something in a separate class:


I also tried soemthing like this (which is not working)


In brief what i'm asking here is:
- good tutos that uses swing with oop and/or mvc
- if you have any ideas about my specific problem here (or references that could help)
- is the pattern observer and observable useful for my (nut)case (and easy too) ?
- anything...

Thank you for reading my post and thank you advance for your answers.
If you need anything to better understand my such as the source code or something let me know i could add some copy paste or stuff
7 years ago