helpful advice - Java
This is a discussion on helpful advice - Java ; can someone help me create a button which will call up an action
listener to which calls up a file choser ,well is that how i would do
it ? i want to create an aplication where by i load ...
-
helpful advice
can someone help me create a button which will call up an action
listener to which calls up a file choser ,well is that how i would do
it ? i want to create an aplication where by i load it up it shows an
image and a hit button then when u hit it it opens a file chooser :P
and also how could i get it to as u imediately when loaded up go to
full screen? cheers e mail me
-
Re: helpful advice
ben.jenson wrote:
> can someone help me create a button which will call up an action
> listener to which calls up a file choser ,well is that how i would do
> it ? i want to create an aplication where by i load it up it shows an
> image and a hit button then when u hit it it opens a file chooser :P
> and also how could i get it to as u imediately when loaded up go to
> full screen? cheers e mail me
>
What code have you written so far?
--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
-
Re: helpful advice
well i have one half which is beginner cos im new at this lol which is
a borderlayout that displays a jbutton and then a listener that say its
activated then another half of code which opens a file option window
where pic and play a movie file but it was a seperate tutorial i did
and i dont know how to put the two together help me lol
IchBin wrote:
> ben.jenson wrote:
> > can someone help me create a button which will call up an action
> > listener to which calls up a file choser ,well is that how i would do
> > it ? i want to create an aplication where by i load it up it shows an
> > image and a hit button then when u hit it it opens a file chooser :P
> > and also how could i get it to as u imediately when loaded up go to
> > full screen? cheers e mail me
> >
> What code have you written so far?
>
> --
>
> Thanks in Advance...
> IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
> __________________________________________________________________________
>
> 'If there is one, Knowledge is the "Fountain of Youth"'
> -William E. Taylor, Regular Guy (1952-)
-
Re: helpful advice
ben.jenson wrote:
> can someone help me create a button which will call up an action
> listener to which calls up a file choser ,well is that how i would do
> it ? i want to create an aplication where by i load it up it shows an
> image and a hit button then when u hit it it opens a file chooser :P
> and also how could i get it to as u imediately when loaded up go to
> full screen? cheers e mail me
>
Perhaps you can take a little more time writing your post so that we can
understand it.
To maximise a window have a look at the method setExtendedState in the
java class Frame. You will find that most windows inherit from this class.
To add an action listener you should learn to read documentation at
java.sun.com and use google, but it would go something like this:
JButton button = new JButton("A Button");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
//write your code to launch a file chooser here
}
});
I make no guarantees, I just wrote the above in 10 seconds, it may have
minor errors, it may not.
Lionel.
Similar Threads
-
By Application Development in forum C
Replies: 49
Last Post: 10-22-2007, 10:36 AM
-
By Application Development in forum TCL
Replies: 4
Last Post: 10-18-2007, 01:11 PM
-
By Application Development in forum RUBY
Replies: 0
Last Post: 09-18-2007, 03:10 PM
-
By Application Development in forum RUBY
Replies: 2
Last Post: 08-16-2007, 12:54 PM
-
By Application Development in forum DOTNET
Replies: 6
Last Post: 05-15-2007, 07:10 AM