import java.awt.*;
import java.awt.event.*;
public class AL extends Frame implements WindowListener,ActionListener {
public static void main(String[] args) {
AL myWindow = new AL("My first window");
mywindow.setSize(350,100);
mywindow.setVisible(true);
}
public AL(String title) {
super(title);
setLayout(new FlowLayout());
addWindowListener(this);
b = new Button("Click me");
add(B)/>;
b.addActionListener(this);
}
public void actionPerformed(ActionEvent e) {
for (int x=0; x<10; x++){
AL myWindow = new AL("My first window");
mywindow.setSize(350,100);
mywindow.setVisible(true);
}
}
public void windowClosing(WindowEvent e) {
for (int x=0; x<10; x++){
AL myWindow = new AL("My first window");
mywindow.setSize(350,100);
mywindow.setVisible(true);
}
}
public void windowOpened(WindowEvent e) {}
public void windowActivated(WindowEvent e) {}
public void windowIconified(WindowEvent e) {}
public void windowDeiconified(WindowEvent e) {}
public void windowDeactivated(WindowEvent e) {}
public void windowClosed(WindowEvent e) {}
}
is there a way to convert java to javascript?i'd like to convert this program to javascript please
Page 1 of 1
10 Replies - 8317 Views - Last Post: 30 April 2010 - 07:51 AM
#1
is there a way to convert java to javascript?
Posted 27 April 2010 - 05:45 AM
Replies To: is there a way to convert java to javascript?
#2
Re: is there a way to convert java to javascript?
Posted 27 April 2010 - 06:58 AM
You'll have to re-code it in Javascript,
I recommend looking into Jquery which is a Javascript framework. You can make a button popup a modal box etc.
This post has been edited by revolutionx: 27 April 2010 - 06:58 AM
#3
Re: is there a way to convert java to javascript?
Posted 27 April 2010 - 09:59 AM
#4
Re: is there a way to convert java to javascript?
Posted 29 April 2010 - 11:51 AM
#5
Re: is there a way to convert java to javascript?
Posted 29 April 2010 - 12:24 PM
Please explain the functionality you want, ie a Button, and then you press it...
#6
Re: is there a way to convert java to javascript?
Posted 29 April 2010 - 05:26 PM
revolutionx, on 29 April 2010 - 11:24 AM, said:
Please explain the functionality you want, ie a Button, and then you press it...
umm well have u tried to run the code i posted? if u did then u might know what i'm attepting. if not:
i'd just like to know how to make a button that when u press it, it opens a second window with a different button.
#7
Re: is there a way to convert java to javascript?
Posted 29 April 2010 - 05:44 PM
#8
Re: is there a way to convert java to javascript?
Posted 29 April 2010 - 05:58 PM
PsychoCoder, on 29 April 2010 - 04:44 PM, said:
im sorry, i didn't mean it in a nasty way or anything. all i'd like to know is how to make a button that when u press it, it opens a second window with a different button.
#9
Re: is there a way to convert java to javascript?
Posted 29 April 2010 - 06:03 PM
#10
Re: is there a way to convert java to javascript?
Posted 30 April 2010 - 05:12 AM
macosxnerd101, on 29 April 2010 - 05:03 PM, said:
i don't have a page to load from though, i'm trying to write it from scratch. you know how in java you can make JFrames? how can you do something like that in HTML or Javascript?
#11
Re: is there a way to convert java to javascript?
Posted 30 April 2010 - 07:51 AM
See: http://www.pageresou...pt/jwinopen.htm
or: http://www.javascrip...aq/openinga.htm
or: http://www.yourhtmls...pupwindows.html
or something else?
Do a search for "javascript open new window" or some other word combination.
|
|

New Topic/Question
Reply



MultiQuote







|