How to create a frame in a applet?

Dear All,
How to create a frame in a applet?
Thanks in advance
Kityy

You can't add a Frame/JFrame to an Applet/JApplet.
An Applet/JApplet has its origins in the class Panel/JPanel.
So, if you make your Applet to an application you
can easily do that by putting your Applet "above" a Frame.
Maybe you can archieve your goals with some Panels?!

Similar Messages

  • Sap script '' how to create table frame in sap script"""

    i have some problem in sap script''  how to create table frame in sap script"""

    Hi,
    you can use BOX command..
    Syntax
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each of XPOS, YPOS, WIDTH, HEIGHT and FRAME both a measurement and a unit of measurement must be specified. The INTENSITY parameter should be specified as a percentage between 0 and 100.
    1. XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    2. WIDTH: Width of the box. Default: WIDTH value of the SIZE command.
    3. HEIGHT: Height of the box. Default: HEIGHT value of the SIZE command.
    4. FRAME: Thickness of frame.
    Default: 0 (no frame).
    5. INTENSITY: Grayscale of box contents as % .
    Default: 100 (full black)
    Measurements: Decimal numbers must be specified as literal values (like ABAP numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
    Units of measurement: The following units of measurement may be used:
    • TW (twip)
    • PT (point)
    • IN (inch)
    • MM (millimeter)
    • CM (centimeter)
    • LN (line)
    • CH (character).
    The following conversion factors apply:
    • 1 TW = 1/20 PT
    • 1 PT = 1/72 IN
    • 1 IN = 2.54 CM
    • 1 CM = 10 MM
    • 1 CH = height of a character relative to the CPI specification in the layout set header
    • 1 LN = height of a line relative to the LPI specification in the layout set header
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shadowing having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    check the fallowing link also
    http://help.sap.com/saphelp_40b/helpdata/en/d1/803293454211d189710000e8322d00/content.htm
    Mark the points if u find it useful...
    Regards,
    Omkar.

  • How to create OA Frame Work Jsp through JDeveloper9i

    Hi,
    any one can help me,
    how to create OA Frame Work Jsp through JDeveloper9i.
    and how to depoy that jsp page into oracle application server.
    plse help me,
    Regards
    ravi

    I am also having the same problem.
    can anyone help me out......?

  • Best IDE and how-to create HTML for a swing Applet

    Can you help me out? I've been using, and teaching with the old Symantec VisualCafe product from long, long, ago. It still works fine & I can even use it to build JFC/Swing Applets etc. But a few things have occurred. For one, a way back, Symantec sold VisualCafe to WEBGAIN - who now has gone out of business and sold it to a company called TOGETHERSOFT - who doesn't support it any longer.
    This isn't really a big deal to me, because I can still build and deploy applets that are pre-swing easily enough. (as can my students)
    HOWEVER... I'd like to be running with the LATEST Java (I think it's 1.4.01) and I'd LIKE to use whatever is the best development environment I can use - especially one I can recommend to my students. Do you know what that should be?
    What's more, I'd still like to take some JFC/Swing created applets (even if compiled with the older VisualCafe IDE) and generate the HTML to allow 1.4 enabled browsers to run them (this is the case for the schools versions of Explorer and Netscape). Now, the HTML I have INSTALLED for the students used the HTML converter - back in 1.2 to produce the HTML at the bottom of this. This code no longer works now with current browsers. Do you know HOW one makes a jfc/swing compiled applet run on the latest browsers?
    Any help or direction you can give would be appreciated.
    thanks,
    Bobby Berns
    [email protected]
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 756 HEIGHT = 396 codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
    <PARAM NAME = CODE VALUE = "lottery.class" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.2" java_CODE = "lottery.class" WIDTH = 756 HEIGHT = 396 pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "lottery.class" WIDTH = 756 HEIGHT = 396 >
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->

    Bobby,
    It's been a while since I've used the HTML Converter, but if I had to guess I'd say you need a newer version than what you have. Also, doesn't the converter allow you to choose which JDK you want to use (in which case you could select 1.4)? Again it's been a while so bear with me. Another option would be to put all the Swing classes into a .jar file (typically called swingall.jar) on your server and include that file as an attribute in your applet tag like this:
    <APPLET CODE="yourApplet.class" ARCHIVE="swingall.jar">
    This way you don't have to use the Java Plug-in, however the initial download time of the .jar file can be significant.
    As for an IDE, I've always been happy using a text editor like UltraEdit. However, I've heard good things about Forte, and hey, it's free!
    Regarding Christina's post, that solution will only work if the Applet does not use Swing components (and Bobby specifically said it does). By using the <OBJECT> and <EMBED> tags, rather than the <APPLET> tag, you force the browser to use the Java Plug-in (rather than the browser's default JVM).
    Hope that helps,
    - Sheepy

  • How to create own Frame?

    Hello,
    How to Create My Own Frame, store it as preset and use it any time?
    Thanks
    Dhiraj

    Steps to follow :
    1. For creating a frame or theme, you would need to create a psd and a metadata file and place it @ the location : C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\9.0\Photo Creations\frames for frames and C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\9.0\Photo Creations\themes for themes.
    2. Next you would need to delete the file ThumbDatabase.db3 from C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\9.0
    3. Relaunch Application.
    The psd name and metadata file name should be same.
    Let me know if this works out for you.
    ~V

  • How to create a frame or box to surround a element

    Hi,
    Would appreciate some help on this one, as I can't seem to figure it out.
    How do you create a frame or box to surround an element, for example when using Hazardstatements.
    The only way I can think of is to use tables, but is there any other way?
    Example:
    Danger
    Some warning text
    Some warning text
    Thanks
    Best regards
    Ronny

    Hi Ronny...
    It's of my opinion that there while you may want this content formatted as a table when published, you should not be authoring the content with a table to achieve that formatting. This type of formatting should be applied as a "publishing process" after the DITA topics are assembled into a FM book and FM chapter files. If you're publishing to other formats (like HTML), the formatting can often be achieved through CSS or by other publishing processes. You don't want your source files to enforce some type of formatting that may differ depending on the deliverable.
    You may want to set up some ExtendScript wrapper that performs various pagination and formatting tasks to your generated FM files. While you can use ExtendScript to actually wrap the hazardstatement in a table, you can also look into using other tools such as FrameSLT (from West Street Consulting), or Structure Snippets (from Leximation, my company).
         http://www.weststreetconsulting.com/WSC_FrameSLT.htm
         http://leximation.com/tools/info/structuresnippets.php
    Cheers,
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • How to create specific Frames

    Hi,
    Using Style and Create Frame I know but some specific frame How to create any one have Idea Please Share.
    Please find the Attached file have Some specific Frame types.
    Thanks
    Dhiraj

    You want to know how to make those specific frames by hand?
    You can find lots with just straight filmstrip tutorials and even some film strip templates...probably images of real ones for that matter... that can be used if you do a Google search. Same goes for the other frames.
    The tutorial I have linked below is using Photoshop. With the exception of doing the transform<warp step, everything can be done using elements. There are other tutorials that build a more detailed filmstrip but  I like this one because it shows how to make a wavy filmstrip.
    http://www.youtube.com/watch?v=ZhLbGleU-iY&feature=related
    Since transform warp isn't available in Photoshop Elements, you'll have to use the displacement filter (filter<distort<displace)  to make the filmstrip wave if desired.
    Above is the displacement map, I made to make my film strip wave. This was made by filling a layer with black and painting a couple of white lines with using the brush tool with a soft wide tip. I duplicated this layer and saved it as a PSD on my desktop.  Displacement maps must be in PSD format. I used this map along with these settings: 0 hoizontal; 50 vertical; stretch to fit; repeat. Note: You must have soft edges to get a wave effect with this filter. If you use hard edges this filter will cut instead of bend.
    Filmstrip images are some CG art I created.
    Frame made using the tutorial.
    Warped with displacement filter using the displacement map of two blurred lines.
    Added a perspective by using free transform as in the video along with a hand made drop shadow to ground the filmstrip. Background was also cropped.
    Final step was to simplify (rasterize) the gradient fill layer that I used over my background layer. I  added a little noise with Add<Noise to my simpified (rasterized) gradient fill layer to get rid of the gradient banding.
    Playing with a different perspective angle because it's kind of fun. Some of the shadow is lightly masked to make it fade a bit where the strip rises.

  • How to create a digital signature formy Applet?

    who can tell me how to create a digital signature for my applet? i want details of the process, because i know nothing about it. Thank you very much!!!

    http://java.sun.com/docs/books/tutorial/security1.2/apisign/gensig.html

  • Help please: How to create  a frame? (not as you think)

    You probably know lots of sites are built with frames, and I
    do not mean the normal frame in flash, I mean a frame to another
    URL.
    I was wondering, can I create such frame in a flash file?
    Thank you, Gal.
    Please replay if you did not understand something.

    Galgofrit wrote:
    > You probably know lots of sites are built with frames,
    and I do not mean the
    > normal frame in flash, I mean a frame to another URL.
    > I was wondering, can I create such frame in a flash
    file?
    > Thank you, Gal.
    > Please replay if you did not understand something.
    No, you can't have frame within flash to display HTML.
    Flash does not have browser capabilities. It can only load
    text with basic HTML formatted
    string. Limited to font size, color, hyper link, font types
    etc... Nothing beyond that.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • How to create a browse button in applet

    Hi All,
    Need another help...
    I want create a Browse Button in java applet frame such that if I click on that button, I can pick a file from any folder of my machine.
    Is there any way to do so? If yes, can you give me a small code as example.
    Regards,
    Uji

    Hey Ujjal,
    I know it's late and I don't know if you're still having this issue but maybe this can be helpful to the next person who has it. As was already said, I think you should probably consider doing this project as an application rather than an applet to avoid file access permission problems. That said, here's how I would do it (since no one has answered your question directly):
    First this class should extend JFrame or some other window class
    Next create a file object (it's static so it can be accessed by anonymous classes later):
    private static File myFile = null;Then, inside the appropriate method (probably something like init() or main()), make the button and give it some functionality with an anonymous MouseListener:
    JButton myBrowseButton = new JButton("Browse");
    myBrowseButton.addMouseListener(new MouseAdapter(){
        // an anonymous MouseAdapter
        public void mouseClicked(MouseEvent e){
            ...now in here you'll want the code to make a JFileChooser in a dialog window
            // create a dialog window
            final JDialog myChooserDialog = new JDialog();
            myChooserDialog.setTitle("Browse");
            // an anonymous JFileChooser
            JFileChooser myFileChooser = new JFileChooser(PATH){
                // an anonymous instantiator to set the text of the select button
                { setApproveButtonText("Select"); }
                // what to do when the user clicks select
                public void approveSelection(){
                    // you might want to make sure the selected file is valid before this step
                    myFile = getSelectedFile();
                    myChooserDialog.dispose();
                // what to do if the user clicks cancel
                public void cancelSelection(){ myChooserDialog.dispose(); }
            ...add the chooser to the dialog and make it visible
            myChooserDialog.add(myFileChooser);
            myChooserDialog.setVisible(true);
            myChooserDialog.pack();
    });Now add the button to the frame and make it visible
    add(myBrowseButton);
    setVisible(true);
    pack();A few notes:
    1) Replace the word PATH with the path to the directory you want to browse (e.g. "." the current working directory)
    2) Make sure all of that code except for private static File myFile = null; goes into a method and isn't just floating around
    3) If ANY of this was confusing then go D.A.F.T (Do A Fecking Tutorial!)
    good luck!
    pieman

  • How to create multi-frame window

    What I want to do is to create a regular application window that has three frames, all divided by shared borders. To further explain what I need, please envision your typical mail client. You have a folder-tree pane, an email list pane, and an email reader pane. All of them part of the same window, yet separate entities. What makes them interesting is that by grabbing the "bar" or border that separates them, you re-size two (or three) panes at once! As one gets larger, the other (s) necessarily shrink.
    In my Netbeans IDE, You can create a JFrame, which is the main window, and you can add, say a menu bar. You can also add a container named 'Panel' which seems to be similar to what I need but not quite. Multiple panels can not share the same border for example. So my question is this:
    How does one divide a JFrame into multiple frames or panels? Thanks!

    JSplitPane
    For questions about its usage the best place is the Swing forum: [http://forum.java.sun.com/forum.jspa?forumID=57]

  • How to create the Frame object with API in 6i?

    do i create an item using d2fitmcr_Create, and then set the type or style to frame? or is it a graphics item that i have to create using a different function? ive tried various combinations with no luck.
    ive looked at the frame object in the GUI, and cant figure out how to duplicate it using the API (the frame object is the thin line box with a label used to groups items visually on a form)
    thanks!
    [email protected]

    Frame is a type of graphic d2fgracr_Create() (d2fgra.h) then set the type as required using d2fgras_graphics_typ():
    Definition of Graphics types is in d2fdef.h
    ** Graphics Type (D2FP_GRAPHICS_TYP)
    ** [BPT]
    #define D2FC_GRTY_ARC              0                                 /* Arc */
    #define D2FC_GRTY_IMAGE            1                               /* Image */
    #define D2FC_GRTY_LINE             2                                /* Line */
    #define D2FC_GRTY_POLY             3                             /* Polygon */
    #define D2FC_GRTY_RECT             4                           /* Rectangle */
    #define D2FC_GRTY_RREC             5                   /* Rounded Rectangle */
    #define D2FC_GRTY_TEXT             6                                /* Text */
    #define D2FC_GRTY_GROUP            7                               /* Group */
    #define D2FC_GRTY_FRAME            8                               /* Frame */All the various properties for setting up the associated block etc (if required) can be set through macros in d2fgra.h

  • Need some direction.... how to create a frame/mask

    I am sure this must be a simple answer... I am just having trouble finding it...
    The end result I am looking for is to have the final video appear to be showing through a frame/mask. I am creating a series of videos and want them all to use the same frame/mask; making it look like the video is playing from behind in the picture frame. This will get rid of the harsh 90 degree corners of the clip and show the clip in a rounded frame....
    My goal is to create this mask and then just drop in different clips to create each little video.
    So... what do I need to do to create this mask? Do I create an image in Photoshop (PNG?) with a particular chroma key in the middle and just key it out? Is there a way to do an Alpha Channel? Am I going down the right path?
    Can you point me in the right direction so I can learn how to do this?
    Thank you in advance..
    Cheers...
    -Steven

    Use Photoshop to make a TIFF with transparency, where the "hole" should be.
    Just place it on a higher video track and it will composite automatically.

  • [NEWBIE] How to open a frame from an Applet?

    Hi, I'm trying to open a JFrame from an Applet. Basically, I would like that, once the user selects an option from a JMenu, a Frame would be shown with a text box where user could type some content.
    I built both the Applet and the Frame, and singularly they work. When I execute the main method from the JFrame, the window appears, but when I execute something like the following from the applet:
    MyFrame mf = new MyFrame();
    mf.setVisible(true);nothing is shown. I'm sure that I don't know something, but I just started with applets.
    Thanks for any help,
    Marco

    If MyFrame is a subclass of JFrame, then it should not
    make any difference.
    What do you need the JFrame for? Can this be done
    using another "screen" by using a CardLayout?From a menu, when the user selects 'Start game' I need a text box coming out so that the user can insert a word. This word should then evaluate an instance member of the Applet.
    Marco

  • How to create a jpeg of a Applet

    i've done an applet that print something, i want that the user can save on his pc the applet in a jpeg, or other format.

         public void start() {
              // TODO Auto-generated method stub
              getContentPane().add(BorderLayout.CENTER, new JPanel()).setBackground(Color.GREEN);
              getContentPane().add(BorderLayout.SOUTH, new JLabel("hahdfhakldf"));
              setVisible(true);
              pack();
              BufferedImage image =
                   new BufferedImage(
                        getWidth() ,
                        getHeight(),
                        BufferedImage.TYPE_INT_RGB);
              Graphics2D g2 = image.createGraphics();
              paint(g2);
              g2.translate(256, 0);
              g2.dispose();
              try {
                             ImageIO.write(image, "jpg", new File("awtImage.jpg"));
                        } catch (IOException ioe) {
                             System.out.println(ioe.getMessage());

Maybe you are looking for

  • External Monitor Not Working With Macbook Pro

    My computer was working fine with an external monitor, then my computer froze, and I had to hold down the power button. When I turned it back on, my computer would not work with an external monitor. I've tried different cables, so it's not the cable.

  • Cast a timestamp to date in a "where" clause

    Hi everybody :) I've got a little problem that seems very simple, but I can't solved it myself :( I've got a column with a "timestamp" format, and I'd like to select all the records that are from a precise date, let's say "12/14/2009". I have the fol

  • IPhone Death Grip and Loss of Signal

    There is NO doubt the new iPhone has "death grip" "loss of signal" issues. Including my new iPhone, there are 4 Verizon phones in my home. All 4 phones show 3 bars when laying on the counter. The iPhone consistently, everytime, drops to 1 bar when it

  • Printing a CD cover...

    When I try to print a CD cover the text is printing overlapped on each other. The album cover art prints fine, just the text is unreadable. This happened with a previous version of iTunes, but when I upgraded, it worked. Now when I recently upgraded

  • How to install garageband? oldish computer

    how do i install garageband on my ibook? i downloaded it and it just comes up with a message that says "an eligible GarageBand application was not found in /Applications". oh and my operating system is mac os x 10.4.11. sorry if this is a stupid ques