Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How Swing JFrame Windows work
How Swing JFrame Windows work [message #781932] Sun, 22 January 2012 19:26 Go to next message
Dennis Putnam is currently offline Dennis PutnamFriend
Messages: 59
Registered: January 2012
Member
I am really struggling with, IMO, poor documentation for the beginner. I am creating a window using window builder. I have a bunch of questions about doing that but for now I am completely baffled how the window communicates with my application. I can get my window to open from my app but that is as far as I can get. I have some fields that the user needs to fill in then click a submit or a quit button. What I don't know is how to wait in my application until a button is clicked, how to determine which one was clicked and how to reference input fields from the window in my app. I have the variables bound using betterbeans binding but beyond that I am clueless. Can someone point me to some beginner documentation that explains all this or spend some time holding my hand? TIA.
Re: How Swing JFrame Windows work [message #782185 is a reply to message #781932] Mon, 23 January 2012 10:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
This is not an Eclipse nor really a window builder question. You should
ask at a general java or swing forum. BTW to react on button klicks
you'll attach an ActionListener to your button.

Tom

Am 22.01.12 20:26, schrieb Dennis Putnam:
> I am really struggling with, IMO, poor documentation for the beginner. I
> am creating a window using window builder. I have a bunch of questions
> about doing that but for now I am completely baffled how the window
> communicates with my application. I can get my window to open from my
> app but that is as far as I can get. I have some fields that the user
> needs to fill in then click a submit or a quit button. What I don't know
> is how to wait in my application until a button is clicked, how to
> determine which one was clicked and how to reference input fields from
> the window in my app. I have the variables bound using betterbeans
> binding but beyond that I am clueless. Can someone point me to some
> beginner documentation that explains all this or spend some time holding
> my hand? TIA.
Re: How Swing JFrame Windows work [message #782301 is a reply to message #782185] Mon, 23 January 2012 13:44 Go to previous messageGo to next message
Dennis Putnam is currently offline Dennis PutnamFriend
Messages: 59
Registered: January 2012
Member
Thanks for the reply. Perhaps I am not understanding what the Window Builder plugin does. I add actionlistners using the GUI but there is still nothing connecting it to my application. It never asks anything about what method in my app to call nor can I figure out what it did to bind the window fields to any variables in my app. I suspect, although there is nothing in the documentation to say this, windowbuilder is really just putting a skeleton action into the class and I have to edit the source to call my app methods.

Also, I may have this backwards but I cannot find a way to add a pointer to my app for the window. It seems there is a problem because window builder creates a 'static' class for the window so this does not work:
class MyClass {
   MyWindow win;
   public MyCLASS() {
      win=new MyWindow();
   }
.
.
.

I have to do this:
class MyClass {
   MyWindow win;
   public MyCLASS() {
      MyWindow.ShowWindow();
   }
.
.
.

But then there is no way to reference MyWindow variables and methods. Am I correct that windowsbuilder simply creates the appearance and everything else has to be added manually? Also that what is currently my main has to be a class whose methods and variables are called from the windowbuilder generated class rather than the other way around?
Re: How Swing JFrame Windows work [message #782310 is a reply to message #782301] Mon, 23 January 2012 14:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
If your problem is window builder then ask at their forum which is at
eclipse.windowbuilder.

Tom

Am 23.01.12 14:44, schrieb Dennis Putnam:
> Thanks for the reply. Perhaps I am not understanding what the Window
> Builder plugin does. I add actionlistners using the GUI but there is
> still nothing connecting it to my application. It never asks anything
> about what method in my app to call nor can I figure out what it did to
> bind the window fields to any variables in my app. I suspect, although
> there is nothing in the documentation to say this, windowbuilder is
> really just putting a skeleton action into the class and I have to edit
> the source to call my app methods.
>
> Also, I may have this backwards but I cannot find a way to add a pointer
> to my app for the window. It seems there is a problem because window
> builder creates a 'static' class for the window so this does not work:
>
> class MyClass {
> MyWindow win;
> public MyCLASS() {
> win=new MyWindow();
> }
Re: How Swing JFrame Windows work [message #782336 is a reply to message #782310] Mon, 23 January 2012 15:02 Go to previous messageGo to next message
Dennis Putnam is currently offline Dennis PutnamFriend
Messages: 59
Registered: January 2012
Member
Thanks for the referral. I did not find that in my search for some reason.
Re: How Swing JFrame Windows work [message #861593 is a reply to message #782336] Sat, 28 April 2012 16:46 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861594 is a reply to message #782336] Sat, 28 April 2012 16:46 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861595 is a reply to message #782336] Sat, 28 April 2012 16:46 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861596 is a reply to message #861595] Sat, 28 April 2012 16:46 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861597 is a reply to message #861595] Sat, 28 April 2012 16:46 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861598 is a reply to message #861597] Sat, 28 April 2012 16:46 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861599 is a reply to message #782336] Sat, 28 April 2012 16:46 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861601 is a reply to message #861599] Sat, 28 April 2012 16:47 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861602 is a reply to message #861601] Sat, 28 April 2012 16:47 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861603 is a reply to message #861602] Sat, 28 April 2012 16:47 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861604 is a reply to message #861599] Sat, 28 April 2012 16:47 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861605 is a reply to message #861603] Sat, 28 April 2012 16:47 Go to previous messageGo to next message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Re: How Swing JFrame Windows work [message #861606 is a reply to message #861605] Sat, 28 April 2012 16:47 Go to previous message
Hans Mueller is currently offline Hans MuellerFriend
Messages: 28
Registered: April 2012
Junior Member
very good
Previous Topic:Accessing Plugins
Next Topic:Internal web browser disabled using Eclipse/Ubuntu 12.04
Goto Forum:
  


Current Time: Fri Apr 26 09:19:10 GMT 2024

Powered by FUDForum. Page generated in 0.09895 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top