Invokelater [message #111520] |
Tue, 29 November 2005 15:38 |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
how can I get eclipse to include the javax.swingUtilites.invokeLater() in
the main method when i create a new swing ve project or when is eclipse
going to incorporate this swing convention in the new project or item
wizard?
e. g.,
public static void main(String[] args) {
javax.swingUtilities.invokeLater(new Runnable() {
public void run() {
JFrame app = new JFrame();
app.setVisible(true);
}
});
}
|
|
|
Re: Invokelater [message #111546 is a reply to message #111520] |
Wed, 30 November 2005 00:41 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I've never seen that convention. The typical convention is not to do an
invoke later on the main. It is typically just new up the frame and set
visible. No need for an invoke later.
Richard wrote:
> how can I get eclipse to include the javax.swingUtilites.invokeLater()
> in the main method when i create a new swing ve project or when is
> eclipse going to incorporate this swing convention in the new project or
> item wizard?
>
> e. g.,
>
> public static void main(String[] args) {
> javax.swingUtilities.invokeLater(new Runnable() {
> public void run() {
> JFrame app = new JFrame();
> app.setVisible(true);
> }
> });
> }
>
>
>
>
--
Thanks,
Rich Kulp
|
|
|
Re: Invokelater [message #111983 is a reply to message #111546] |
Wed, 30 November 2005 18:31 |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
When j2se 1.4 was released, sun recommended to use this with all swing
applications on java.sun.com under how to use threads. They mentioned EDTs
with swing applications. The company that I work at wants to abid by this
recommendation.
|
|
|
|
|
Re: Invokelater [message #112062 is a reply to message #112057] |
Thu, 01 December 2005 15:52 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Ok, no one told us of this. However, Eclipse's new class wizard doesn't
know a Swing class from a hole in the wall, so they can't do it. The
only one who knows anything about visual is the VE's New Visual Class
Wizard.
The problem is that main is typically only for an application, NOT a
subclass of a Swing class. An application is simply a class that
subclasses Object and uses other classes. So for the VE we could put
this into the Swing Application style. It doesn't make sense to do this
anywhere else. You don't normally subclass JFrame and put a main on it
that runs that JFrame subclass.
So you can open a defect against VE to generate this invokeLater on the
New Visual Class Wizard Swing->Application style.
Richard wrote:
> Can anyone help me out?
>
--
Thanks,
Rich Kulp
|
|
|
Re: Invokelater [message #112128 is a reply to message #112062] |
Thu, 01 December 2005 19:10 |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
When you meen defect, does that mean I to enter a bugzilla entry for this?
|
|
|
Re: Invokelater [message #112170 is a reply to message #112128] |
Thu, 01 December 2005 20:23 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Yes, it would be Product VE, Component JFC/Swing.
Richard wrote:
> When you meen defect, does that mean I to enter a bugzilla entry for this?
--
Thanks,
Rich Kulp
|
|
|
|
Re: Invokelater [message #112297 is a reply to message #112183] |
Fri, 02 December 2005 21:08 |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
Can I create a new wizard project plug-in using a visual class? would that
do the trick?
|
|
|
Re: Invokelater [message #112308 is a reply to message #112297] |
Fri, 02 December 2005 23:22 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I don't know what you mean by you creating a new wizard project plugin-in.
Richard wrote:
> Can I create a new wizard project plug-in using a visual class? would
> that do the trick?
>
--
Thanks,
Rich Kulp
|
|
|
Re: Invokelater [message #112345 is a reply to message #112308] |
Sat, 03 December 2005 22:46 |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
Can create an eclipse plug-in that contains a visual class with the
invokelater code and bring it as a new item in the new tab? would that do
the trick?
|
|
|
Re: Invokelater [message #112380 is a reply to message #112345] |
Mon, 05 December 2005 18:53 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Do you mean File->New->... If so, then you can do anything you want
since you need to completly write the wizard yourself for it to show
there. There will be no Visual Editor input to that at all.
Richard wrote:
> Can create an eclipse plug-in that contains a visual class with the
> invokelater code and bring it as a new item in the new tab? would that
> do the trick?
>
--
Thanks,
Rich Kulp
|
|
|
Re: Invokelater [message #112409 is a reply to message #112380] |
Mon, 05 December 2005 19:19 |
Eclipse User |
|
|
|
Originally posted by: milnfalcon4163.yahoo.com
ok. thanks. I have entered a defeat bug report. I will wait until there is
a resolution. Thanks again.
|
|
|
Re: Invokelater [message #611372 is a reply to message #111520] |
Wed, 30 November 2005 00:41 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I've never seen that convention. The typical convention is not to do an
invoke later on the main. It is typically just new up the frame and set
visible. No need for an invoke later.
Richard wrote:
> how can I get eclipse to include the javax.swingUtilites.invokeLater()
> in the main method when i create a new swing ve project or when is
> eclipse going to incorporate this swing convention in the new project or
> item wizard?
>
> e. g.,
>
> public static void main(String[] args) {
> javax.swingUtilities.invokeLater(new Runnable() {
> public void run() {
> JFrame app = new JFrame();
> app.setVisible(true);
> }
> });
> }
>
>
>
>
--
Thanks,
Rich Kulp
|
|
|
|
|
|
Re: Invokelater [message #611414 is a reply to message #112057] |
Thu, 01 December 2005 15:52 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Ok, no one told us of this. However, Eclipse's new class wizard doesn't
know a Swing class from a hole in the wall, so they can't do it. The
only one who knows anything about visual is the VE's New Visual Class
Wizard.
The problem is that main is typically only for an application, NOT a
subclass of a Swing class. An application is simply a class that
subclasses Object and uses other classes. So for the VE we could put
this into the Swing Application style. It doesn't make sense to do this
anywhere else. You don't normally subclass JFrame and put a main on it
that runs that JFrame subclass.
So you can open a defect against VE to generate this invokeLater on the
New Visual Class Wizard Swing->Application style.
Richard wrote:
> Can anyone help me out?
>
--
Thanks,
Rich Kulp
|
|
|
|
Re: Invokelater [message #611429 is a reply to message #112128] |
Thu, 01 December 2005 20:23 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Yes, it would be Product VE, Component JFC/Swing.
Richard wrote:
> When you meen defect, does that mean I to enter a bugzilla entry for this?
--
Thanks,
Rich Kulp
|
|
|
|
|
Re: Invokelater [message #611451 is a reply to message #112297] |
Fri, 02 December 2005 23:22 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I don't know what you mean by you creating a new wizard project plugin-in.
Richard wrote:
> Can I create a new wizard project plug-in using a visual class? would
> that do the trick?
>
--
Thanks,
Rich Kulp
|
|
|
|
Re: Invokelater [message #611462 is a reply to message #112345] |
Mon, 05 December 2005 18:53 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Do you mean File->New->... If so, then you can do anything you want
since you need to completly write the wizard yourself for it to show
there. There will be no Visual Editor input to that at all.
Richard wrote:
> Can create an eclipse plug-in that contains a visual class with the
> invokelater code and bring it as a new item in the new tab? would that
> do the trick?
>
--
Thanks,
Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.05824 seconds