FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   open new window..possible?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: open new window..possible?  (Read 1770 times)
primeclub


open new window..possible?
« on: Jul 11th, 2003, 1:37am »

is it possible to open new windows with proce55ing content in the way like here? didn't find anything about it...
 
http://www.absurd.org/((((((/coremelt/
 
i could of course open new popups with javascript and then have applets there, but the popups are restricted to certain minimun sizes, expecially on a mac... with java it's much more free
 
 
kevin

WWW
Re: open new window..possible?
« Reply #1 on: Jul 14th, 2003, 9:05pm »

Hey, the embedding links program in the examples section shows you how:
 
http://proce55ing.net/learning/examples/embedded_links.html
 
Code:
goURL("http://www.proce55ing.net");  
goURL("http://www.groupc.net", "_new");

 
Hope that helps.
 
primeclub


Re: open new window..possible?
« Reply #2 on: Jul 16th, 2003, 3:40am »

thanks for the reply, but i mean REAL pop up's, not just a new browser window.. if you check the link i posted, you also have to include the  
/((((((/coremelt/  
part (which is not linked) ..
 
you see that you can open windows small as 10x10 px in java - impossible with javascript. i once made a little java program to do that but i didn't find a way in proce55ing.. but maybe i missed something..
 
benelek

35160983516098 WWW Email
Re: open new window..possible?
« Reply #3 on: Jul 16th, 2003, 4:30am »

i'm getting applet-not-starting errors with ur applet..
 
primeclub


Re: open new window..possible?
« Reply #4 on: Jul 16th, 2003, 1:57pm »

it's not my thingie, just found it on the web & liked it
strange, today i get the same in IE6.. worked some days before.. but in Netscape7 it still does.. (PC)
 
if it won't run on your maschine, what it does is that it opens a lot of very small windows with all java content & moves them around.. don't be scared, it stops after 10 seconds or so
 
kevin

WWW
Re: open new window..possible?
« Reply #5 on: Jul 16th, 2003, 5:58pm »

Sorry bout that primeclub, misunderstood you.
 
If you want to do popups from processing it's exactly the same as normal.
 
Here's a link to do it:
http://www.designf1.webcentral.com.au/tutorials/jswin002_ws.html
 
Put this code in the top of the page:
Code:
<script language="javascript" type="text/javascript">
<!--
 function genericPopup(page){
  window.open(page,'','width=300,height=300');
 }
// -->
</script>

 
And then in processing do this:
Code:

goURL("javascript: genericPopup('mypopup.html')");  

 
That's not tested, but i'm pretty confident it'll work.
 
g'luck
 
toxi

WWW
Re: open new window..possible?
« Reply #6 on: Jul 16th, 2003, 6:31pm »

primeclub, unfortunately this is not what P wants though. he's talking about java windows (not javascript ones!)
 
here's something which should work fine, but obviously this has not much to do with processing anymore...
 
Code:

TestFrame f;
 
void setup() {
  f=new TestFrame();
}
 
void loop() {
 
}
 
class TestFrame extends Frame {
  Button button1 = new Button();
 
  public TestFrame() {
    button1.setVisible(true);
    button1.setLabel("close");
    button1.setLocation(new Point(80, 50));
    button1.setSize(new Dimension(130, 20));
    setLocation(new Point(0, 0));
    setLayout(null);
    setTitle("windowtitle");
    add(button1);
 
    setSize(new Dimension(300, 100));
    setVisible(true);
 
    button1.addMouseListener(new MouseAdapter() {
 public void mouseClicked(MouseEvent e) {
   button1MouseClicked(e);
 }
    });
 
    addWindowListener(new WindowAdapter() {
 public void windowClosing(WindowEvent e) {
   thisWindowClosing(e);
 }
    });
  }
 
  void thisWindowClosing(WindowEvent e) {
    cleanUp();
  }
 
  void button1MouseClicked(MouseEvent e) {
    cleanUp();
  }
 
  public void cleanUp() {
    setVisible(false);
    dispose();
  }
}
 

http://toxi.co.uk/
primeclub


Re: open new window..possible?
« Reply #7 on: Jul 16th, 2003, 7:09pm »

toxi, thanks a lot! that was what i was looking for
i tried a bit with the code, but i couln't manage to execute processing-commands in the new window. is that possible, or do i have to stick to real java syntax within the new frame?
thanks again & i really like your site and the stuff you do, just came along it today after a long time by coincidence!
 
cheers
andre // http://lumberroom.primeclub.org
 
toxi

WWW
Re: open new window..possible?
« Reply #8 on: Jul 16th, 2003, 7:29pm »

hi andre,
 
yes, P5 syntax drawing commands won't work within such a window as they all only use the pixel buffer associated with the applet. in future, bagel (the P5 gfx library) might support multiple drawing surfaces, but at current you'll have to do your own stuff. however you could use such windows/frames to use standard java GUI elements to control the main P5 applet. almost like a remote control...
 
btw. thanks for the compliments! l8rs.........
 

http://toxi.co.uk/
Pages: 1 

« Previous topic | Next topic »