I want to create an applet, Please Help...

HI all,
I want to create an applet which should be able to display text and images...
To display text in an applet I am using ...
import java.awt.*;
import java.applet.*;
public class SimpleApplet extends Applet
    public void paint(Graphics g)
        g.drawString("A Simple Applet", 20, 20);
}Now If I want to create few operators in a different class, and i want to use it from the SimpleApplet class what should be doing.

HI all,
I am creating an Gui: The code is here:
import javax.swing.*;
import java.awt.*;
public class Tab extends JFrame
    JPanel p,p1,p2,p3,p4,p5;
    Frame f1,f2,f3;
    JTabbedPane tpane;
    public Tab()
        p = new JPanel();
        p1 = new JPanel();
        p2 = new JPanel();
        p3 = new JPanel();
        p4 = new JPanel();
        p5 = new JPanel();
        tpane = new JTabbedPane();
        p.setLayout(new GridLayout(1,1));
        tpane.addTab("File",p1);
        tpane.addTab("Edit",p2);
        tpane.addTab("Document",p3);
        tpane.addTab("View",p4);
        tpane.addTab("Help",p5);
        p.add(tpane);
        getContentPane().add(p);
        setVisible(true);
    public static void main(String[] args)
        // TODO Auto-generated method stub
        Tab t = new Tab();
}I want to diaplay some text in the main area left. What should I do.
How to add the Text.

Similar Messages

  • I want to cancel my subscription, please help me!

    I Want to cancel my subscription because it didnt do what I expected to do, please some help me!

    Oh ok. I tried doing so, but i couldn't, is there anyway you can explain me how to do it? A link or a video where It's explained. Thank anyways
    Att: Jhordy Alberto Garcia Díaz
    El 19/08/2014, a las 18:32, "Sara.Forsberg" <[email protected]> escribió:
    I want to cancel my subscription, please help me!
    created by Sara.Forsberg in Adobe ExportPDF - View the full discussion
    Hi Jhordy,
    Oh, I see! You purchased your subscription through the App store, that's why Adobe doesn't have record of it. You need to go through the App store to cancel/refund your subscription.
    I apologize for the inconvenience.
    Best,
    Sara
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6656327#6656327
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe ExportPDF by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • I have forgotten my password for iPod Touch 4G and it is now disabled. I tried connecting to iTunes but i haven't synced before and i need to enter the password before i can back it up so i can restore it. I don't want to lose pictures so please help!

    I have forgotten my password for iPod Touch 4G and it is now disabled. I tried connecting to iTunes but i haven't synced before and i need to enter the password before i can back it up so i can restore it. I don't want to lose pictures so please HELP!

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased. That is how it works
    iOS: Forgot passcode or device disabled
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: Back up and restore your iOS device with iCloud or iTunes       
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        
    If problem what happens or does not happen and when in the instructions? When you successfully get the iPod in recovery mode and connect to computer iTunes should say it found an iPod in recovery mode.

  • My ipod touch is in DFU mode 5g I need help, do not want to lose my data, please help in Spanish

    I need help, do not want to lose my data, PLEASE HELP IN SPANISH

    Una vez que el dispositivo está pidiendo ser restaurado con iTunes ... ya es demasiado tarde para salvar nada ... y usted debe continuar con la recuperación de ...
    Vea aquí> http://support.apple.com/kb/HT1808
    Es posible que tenga que probar más de una vez ... Asegúrese de seguir todos los pasos ...
    Tómese su tiempo ... Preste especial atención a los pasos 3 y 4.
    Para minimizar la pérdida ...
    Después de haber recuperado su dispositivo ...
    Re-sincronizar su contenido o restauración de la última copia de seguridad ...
    Restaurar desde copia de seguridad> http://support.apple.com/kb/ht1766
    Once the Device is asking to be Restored with iTunes... it is too late to save anything... and you must continue with the Recovery...
    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    To minimise loss...
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • In iOS 5 on the iphone 3gs, how does one disable voice control, not voice dailing.  I have never wanted or used voice control please help me disable it.

    In iOS 5 on the iphone 3gs, how does one disable voice control, not voice dailing.  I have never wanted or used voice control please help me disable it. 

    are you talking about voiceover where the phone is reading things out loud to you? you have to double tap things in voiceover in order to select them. you'll need to go to settings > general > accessibility > and turn off voiceover there

  • I want to delete my account, please help me!

    I want to delete my account, please help me!

    Hi Céliine,
    It looks like you are all set! Your account has been canceled.
    If not, just let me know.
    Kind regards, Stacy

  • What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?, What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?

    What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?, What should I do if annemen the Macbook Pro does not want a USB stick? Please Help me?

    What are you talking about? What is annemen? Clarify.

  • HT204411 you have rentals that have not expired. what does that meen?i just want to change the country please help

    you have rentals that have not expired. what does that meen?i just want to change the country please help

    I have the same problem

  • When i use the mail on my i phone and outlook simultaneousaly, the outlook does not download emails and says "account already being accessed", i want both to work together, please help.

    when i use the mail on my i phone and outlook simultaneousaly, the outlook does not download emails and says "account already being accessed", i want both to work together, please help.

    This is the ipod touch forum

  • I need to create Buttons dynamically Please Help

    I am currently developing a card game. I represent my cards as buttons. But as the player draws more cards from the deck I have to generate buttons dynamically at run-time. I could use arrays of buttons and store new buttons inside that arrays of buttons. But the only problem is I need ActionListener for each of my buttons. How do you create ActionListener for each different dynamically created buttons? Please Help.

    Here is my code. I just do not understand how to create those functions dynamically that functions different each time.
    Here is my code please take a look.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class run108{
    JButton setbutton;
    JButton ButtonUp;
    JButton ButtonDeal;     
    JButton slot1;
    JButton slot2;
    JButton slot3;
    JButton slot4;
    JButton slot5;
    JButton slot6;
    JButton slot7;
    cards[] card = new cards[55];
    public static void main(String[] argv)
         run108 startgui = new run108();
         startgui.createframe();     
    void createframe()
         //Standard of way of creating Frame
         JFrame frame = new JFrame("108");
         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         frame.setLocation(300,200);// Tells the startup position;
         //Adding Panels to the framework
         JPanel panelA = new JPanel();
         panelA.setBackground(Color.white);
         panelA.setLayout(new BoxLayout(panelA,BoxLayout.Y_AXIS));
         JPanel panelB = new JPanel();
         JPanel panelC = new JPanel();
         //Adding buttons with card images
         JLabel label1 = new JLabel("       Set of Cards");
         panelA.add(label1);
         ImageIcon pic1 = new ImageIcon("cards/backd.png");
         setbutton = new JButton(pic1);          
        panelA.add(setbutton);
        ImageIcon picdeal = new ImageIcon("cards/deal.png");
         ButtonDeal = new JButton(picdeal);
         panelA.add(BorderLayout.CENTER, ButtonDeal);
        ButtonDeal.addActionListener(new DealListener());
         JLabel label2 = new JLabel("       Your Target");
         panelA.add(label2);
         ButtonUp = new JButton(pic1);          
        panelA.add(BorderLayout.CENTER, ButtonUp);
        frame.add(BorderLayout.WEST,panelA);
        // Adds 7 initial card slots.
         ImageIcon pic2 = new ImageIcon("cards/backc.png");
         slot1 = new JButton(pic2);
        panelB.add(slot1);          
        slot1.addActionListener(new Slot1Listener());
        slot2 = new JButton(pic2);
        panelB.add(slot2);
        slot2.addActionListener(new Slot2Listener());
         slot3 = new JButton(pic2);
        panelB.add(slot3);
        slot3.addActionListener(new Slot3Listener());
         slot4 = new JButton(pic2);
        panelB.add(slot4);
        slot4.addActionListener(new Slot4Listener());
         slot5 = new JButton(pic2);
        panelB.add(slot5);
        slot5.addActionListener(new Slot5Listener());
         slot6 = new JButton(pic2);
        panelB.add(slot6);
        slot6.addActionListener(new Slot6Listener());
         slot7 = new JButton(pic2);
        panelB.add(slot7);
        slot7.addActionListener(new Slot7Listener());
        frame.add(BorderLayout.CENTER,panelB);
        // This has to be added @ the end to show the components
        //that were added after on. If it is placed before the components
        //the components shall not appear since they sit on the frame
         frame.setSize(600,500);
         frame.setVisible(true);
    class DealListener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot1Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot2Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot3Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot4Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot5Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot6Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    class Slot7Listener implements ActionListener
         public void actionPerformed(ActionEvent event){}
    }

  • Problem in creating DB Link - Please help

    Hi ,
    I created a DB Link with name "CTM_DBLINK".
    i want to create DB Link with different name but using same server and connection also same.
    When i am trying this its shows error :
    "ORA-00933:SQL Command not properly ended."
    My Query :
    create public database link "CTM_BANK"
    connect to ABC
    identified by <pwd>
    using 'database';
    i am getting error on line 3 : identified by <pwd>
    Please help , its urgent.
    Surender

    Try enclosing the password in quotes.
    Same problem occurs if you try to create a user using the password you have given.
    SQL> create user abc identified by abc!;
    create user abc identified by abc!
    ERROR at line 1:
    ORA-00922: missing or invalid option
    SQL> create user abc identified by "abc!" ;
    User created.
    To create the database link, try this:
    SQL> CREATE PUBLIC DATABASE LINK "CTM_BANK" CONNECT TO "ABC"
    2 IDENTIFIED BY "abc!"
    3 USING 'database' ;
    Database link created.
    Hope that helps!
    Regards.
    RK

  • I want to create a bsp page help me

    i want to create a page
    in which the following should be there,
    1.  A selection screen or a listbox for a pernr field from catsdb,
    2.  according to that pernr no i want to display all that week transaction done by him in catsdb.
    help me please,
    thank you,
    Points will be rewarded
    regards,
    Jagrut BharatKumar Shukla

    Look the following exaplmes for BSP developments.
    http://www.sapdevelopment.co.uk/webapps/bsp/washome.htm
    In your case you can use the HTMLB extensions like.
    dropDownListBox
    listBox
    to display list of PERNS in CATSDB.
    and display the CAT entries in a table view.
    Amandeep

  • Internal software error cpp, line 214 - creating subtitles failed / please help

    Hello,
    it a pretty toutgh expierience trying to create my first dvd with Adobe,
    I have to hand it over this Friday, in some 12 hours,
    and there is another issue I have to cope with:
    1. I have the project ready, I check for errors and there are no.
    2. My project has 2 two timelines (movie and soundtrack) and subtitles in 7 languages. All already transcoded.
    3. I press build DVD.ISO and here comes the wonderful Adobe greeting: Internal software error. File Spec: cpp, line 214. I clik ok and the other window appears happilly informing me that creating subtitles failed. And creating of thesee subtitles was the only reason I started using Adobe Premiere Pro and Encore
    Could you please help me, I am going slightly crazy with it. How can I resolve this issue. I tried to look at the forum, but did not find the solution. Neither @ google.
    Best regards,
    Michal

    Thanks a lot Stan !
    I did two timelines, since I wanted to give the possibility to listen to the music track, without watching the movie. No idea if this could be done in one timeline (I am just starting my Adobe adventure .
    Coming to the point, I fixed it. Here is how:
    1. While building DVD the message was: Internal software error. File Spec: cpp, line 214. and creating subtitles failed.
    2. I tried to make really big spaces between subtitles, as well as change the fonts, the kerings, etc. - to no avail.
    3. I deleted all the subtitle text (marking it with the mouse and pressing delete), but leaving all the subtitle tracks, since I did not want to link them all again to the subtitle menu buttons.
    4. For each subtitle track I imported the subtitle text once again.
    And it worked! So simple if one already knows how to do it.
    Thanks for help anyway, you and others at this forum helped me a lot during the whole project (missing Encore library, baddriver.txt to mention the most critical issues).
    Best regards,
    Michal

  • Swing applet- please help

    Hi,
    I am still trying to make sense of the java code...
    I thought it should be easy to create an applet, but I don't know what is wrong.
    Could anyone help me debugging it?
    Here is the code and the error msg:
    package BrImage;
    /* Example 16-3 An Image Previewer Accessory implements BrImagFile*/
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.beans.*;
    import java.io.*;
    import java.applet.Applet;
    public class BrImage extends JApplet {
    public void init() {
    getContentPane().add(new JLabel("JAppletSwing!"));
    public class BrImagFile extends javax.swing.JFrame {
    JFileChooser chooser = new JFileChooser();
    ImagePreviewer previewer = new ImagePreviewer();
    PreviewPanel previewPanel = new PreviewPanel();
    class PreviewPanel extends javax.swing.JPanel {
    public PreviewPanel() {
    JLabel label = new JLabel("Image Previewer",SwingConstants.CENTER);
    setPreferredSize(new Dimension(150,0));
    setBorder(BorderFactory.createEtchedBorder());
    setLayout(new BorderLayout());
    label.setBorder(BorderFactory.createEtchedBorder());
    add(label, BorderLayout.NORTH);
    add(previewer, BorderLayout.CENTER);
    public BrImagFile() {
    super("Image Previewer");
    Container contentPane = getContentPane();
    JButton button = new JButton("Select A File");
    contentPane.setLayout(new FlowLayout());
    contentPane.add(button);
    chooser.setAccessory(previewPanel);
    button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int state = chooser.showOpenDialog(null);
    File file = chooser.getSelectedFile();
    String s = "CANCELED";
    if(file != null && state == JFileChooser.APPROVE_OPTION) {
    s = "File Selected: " + file.getPath();
    /* needs to open file on the right html */
    JOptionPane.showMessageDialog(null, s);
    chooser.setFileFilter(new ImageFilter()); /*test filter */
    chooser.addPropertyChangeListener(
    new PropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent e) {
    if(e.getPropertyName().equals(
    JFileChooser.SELECTED_FILE_CHANGED_PROPERTY)) {
    File f = (File)e.getNewValue();
    String s = f.getPath(), suffix = null;
    int i = s.lastIndexOf('.');
    if(i > 0 && i < s.length() - 1)
    suffix = s.substring(i+1).toLowerCase();
    if(suffix.equals("gif") ||
    suffix.equals("jpg") ||
    suffix.equals("bmp"))
    previewer.configure(f);
    class ImagePreviewer extends javax.swing.JLabel {
    public void configure(File f) {
    Dimension size = getSize();
    Insets insets = getInsets();
    ImageIcon icon = new ImageIcon(f.getPath());
    setIcon(new ImageIcon(icon.getImage().getScaledInstance(
    size.width - insets.left - insets.right,
    size.height - insets.top - insets.bottom,
    Image.SCALE_SMOOTH)));
    class ImageFilter extends javax.swing.filechooser.FileFilter {
    public boolean accept(File f) {
    boolean accept = f.isDirectory();
    if( ! accept) {
    String suffix = getSuffix(f);
    if(suffix != null)
    accept = suffix.equals("jpg") ||
    suffix.equals("gif") ||
    suffix.equals("bmp");
    return accept;
    public String getDescription() {
    return "Image Files(*.gif *.jpg *.bmp)";
    private String getSuffix(File f) {
    String s = f.getPath(), suffix = null;
    int i = s.lastIndexOf('.');
    if(i > 0 && i < s.length() - 1)
    suffix = s.substring(i+1).toLowerCase();
    return suffix;
    public static void main(String a[]) {
    JApplet applet = new BrImage();
    JFrame f = new BrImagFile();
    f.setBounds(300, 300, 300, 75);
    applet.init();
    applet.start();
    f.setVisible(true);
    /* f.setDefaultCloseOperation(
    WindowConstants.DISPOSE_ON_CLOSE); */
    f.addWindowListener(new WindowAdapter() {
    public void windowClosed(WindowEvent e) {
    System.exit(0);
    BrImage/BrImage.java [109:1] non-static variable this cannot be referenced from a static context
    JFrame f = new BrImagFile();
    ^
    1 error
    Errors compiling BrImage.

    Hi again,
    Please help.
    JL

  • Error while Creating sequence. Please help

    I'm using below script to create sequence but getting error
    Error report:
    SQL Error: ORA-01722: invalid number
    01722. 00000 - "invalid number"
    CREATE SEQUENCE BL_BTN_MASTER_SEQ
    MINVALUE 1
    MAXVALUE 999999999999999999
    INCREMENT BY 1
    START WITH (SELECT MAX(BULLETIN_MASTER_ID)+1
    FROM BL_BTN_MASTER)
    NOCACHE;
    FYI..Data type of bulletin_master_id column is NUMBER(22,0)
    PLease help.
    Edited by: user11228834 on May 29, 2013 10:22 AM
    Edited by: user11228834 on May 29, 2013 10:23 AM
    Edited by: user11228834 on May 29, 2013 10:25 AM

    Oracle doesn't like the "(select max(bulletin_master_id)+1 from bl_btn_master)' statement embedded in the CREATE SEQUENCE statement because if you look at the syntax it is expecting an acual number. You could use execute immediate to create the sequence this way:
    {code}
    declare
    v_seq number;
    v_statement varchar2(200);
    begin
    select max(bulletin_master_id)+1
    into v_seq
    from bl_btn_master;
    v_statement := 'CREATE SEQUENCE BL_BTN_MASTER_SEQ ' ||
    'MINVALUE 1 ' ||
    'MAXVALUE 999999999999999999 ' ||
    'INCREMENT BY 1 ' ||
    'START WITH ' || v_seq ||
    'NOCACHE';
    execute immediate(v_statement);
    end;
    {code}

Maybe you are looking for

  • Pages very slow to load

    Hello, All of the sudden my Safari is very slow, and pages take almost one entire minute to load.  Is there anyway I can speed this up or clean up my system?

  • KE24 Functionality ?

    in KE24 Report showing Negative values and Positive values for any changes that we done in Sales Order for the respective line item. I want to know in which cases it will show the Negative values and which cases it wil shows Positive Values and it is

  • New Macbook Air 13"

    I have a Macbook Air 13" which i bought new a week ago. I find it terribly slow, especially when using the internet. I also have an Imac which is using the same connection and is not slow. Is there a setting or something that needs to be changed

  • Error :Value of restricted LOV parameter not among the selectable values

    Hi, I am designing a report which has two layouts. I have a parameter :P_Reason_code which is applicable to only one layout. There is a repeating frame in my first layout which should display only if :P_Reason_code value is 'Y'. I have wriiten a form

  • AQJMS Exception In B2B

    Hi all, We tried to send an message to the FTP server using B2B. We published the message and it was sucessful. When I looked in the server, the file was missing. We are facing AQJMS exception in the B2B.log file. Please find the below stack trace. P