how to open a new window with specialized attributes(width,Height,etc)?

i have tried getAppletContext().showDocument(url),but it just to go a new URL,not a new window.

and i want to open a new window with specialized attributes:position,width,height,etc.

anyone can help me? thank you.
Mike2000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ravindra76Commented:
Hi Mike2000,

 It's very simple.

 Add one another String as parameter to showdocument.

Sample code

import java.awt.*;
import java.net.*;
import java.applet.*;

public class NewWin extends Applet {

  public void init() {
  try {
      AppletContext ac = getAppletContext();
      ac.showDocument(new               URL("http://yourserver/yourfile.html"),"Junk" );
       } catch ( Exception ee ) { ee.printStackTrace();}
      
  }
}


With onlu URL parameter, it will open same window.

If you give second parameter in the method, it will opne in different window.

Best of luck
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike2000Author Commented:
but i can't find any method to initialize the new window's width and height and position.
0
Ravindra76Commented:

Hi Mike2000,

 Actually the above method is for redirecting htnl page to frames. Since we have given junk string, it opened a new window
The secnod parameter is  "Target" . If you have already a frame, it will come in that frame.

I din n't find method to fix height and width of window. This
metho i found in

AppletContext class

Best of luck
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.