Problem with Applets in same page

Hai to all,
I am having a problem with GUI in applets
My first class extends a JPanel named A_a
import javax.swing .*;
import java.awt.*;
import java.awt.event.*;
public class A_a extends JPanel
JButton jb;
JTextArea text;
public A_a()
setLayout(new FlowLayout());
jb=new JButton("Click me");
//add(jb);
text=new JTextArea(5,20);
add(text);
public void text_appendText(String aa)
System.out.println("I AM IN A_a");
text.append(aa);
text.revalidate();
revalidate();
/*public static void main(String ags[])
A_a a = new A_a();
JFrame frame=new JFrame();
frame.getContentPane().add(a);
frame.pack();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) { System.exit(0); }
frame.setSize(200,200);
frame.show();
and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class B_b extends JApplet
public A_a a;
public void init()
a=new A_a();
getContentPane().add(a);
public void text_appendText(String aa)
final String aaa =aa;
new Thread(new Runnable()
     public void run()
          a=new A_a();
          a.setBackground(new java.awt.Color(255,200,200));
          System.out.println("I AM IN B_b");
          a.text.append(aaa);
          a.text.revalidate();
          getContentPane().remove(a);
          resize(500,500);
     }).start();
and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
import javax.swing .*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.util.*;
public class C_c extends JApplet implements ActionListener
JButton jbt;
JTextArea jta;
public void init()
getContentPane().setLayout(new FlowLayout());
jbt=new JButton("Click me");
jbt.addActionListener(this);
getContentPane().add(jbt);
jta=new JTextArea(5,20);
getContentPane().add(jta);
public void actionPerformed(ActionEvent ae)
Enumeration e = getAppletContext().getApplets();
Applet applets = null;
          while(e.hasMoreElements())
               applets=(Applet)e.nextElement();
               if ( applets instanceof B_b)
                         System.out.println("I AM CLASS C_c");
                         ((B_b)applets).text_appendText(jta.getText());          
                         ((B_b)applets).remove());
                         ((B_b)applets).getContentPane().add(D_d);
both the applets C_c and B_b are in same browser page
How can i achive that pls help .

please help me its urgent for my project

Similar Messages

  • Problem with direction in a page(??????)

    Hi every body,
    I have a problem with direction in some page when i change the language to Arabic(right to left language).
    in some page like welcome page its completely true ,but in some page that i buile with my self (and add some portlet to it like :advanced search portlet)its directon does not appear properly,the label is appear in left, and text box appear in right(its not true).
    what can i do??????????????????
    please answer me :(

    This is not the right forum for your question. Try to post it in the Oracle Application Server Portal forum, or contact Oracle Support.
    Peter

  • Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the pag

    Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the page, so it suits size automatically) to a mobile web page to be displayed not on a normal browser, but in a WebView.

    Hi, I'm having problems with viewing a web page created with Adobe Muse CC latest release, I followed the various guides provided by Adobe, but the problem persists. The problem especially concerns the distorted display (the contents do not fit on the page, so it suits size automatically) to a mobile web page to be displayed not on a normal browser, but in a WebView.

  • REAL problems with iMessage activation same with Face Time

    I'm having real problems with IMessage activation same with FaceTime, the phone shows the activation is being made but it does not activate!
    Apple ID and password is OK, it's working with other applications
    Any ideas guys?!

    My daughters had the same problem with both of their iPod Touches.  One logged back into iMessage and FaceTime, the other consistently would not login with the same error, "An error occurred during activation.  Try again." 
    Check your date and time.  Its likely incorrect.  Once the date is corrected.  Restart the device. 
    For what ever reason, some devices lose track of the date.  In my case, apparently, my daughters change the date to affect a particular game by advancing the date.  Little cheaters. (LOL)
    Hope this helps!

  • Really having problems with organising documents in pages. For example, deleting pages deletes the whole section and I cannot insert a section break as its greyed out & sending an object to background deletes several pages - what the **** is going on???

    Really having problems with organising documents in pages. For example, deleting pages deletes the whole section and I cannot insert a section break as its greyed out & sending an object to background deletes several pages and trying to insert a text box autmatically creates new pages- what the **** is going on??? Is this programme really this badly thought out? I thought everything apple was supposed to be intuitive!?!?!? Help.

    You can not insert a section break into a textbox.
    You appear to have a lot of objects with wrap set, that once you take them out of the flow of text (by sending them to the background) causes the text to reflow and contract into fewer pages. Pages is almost unique in the way it forms up pages in Word Processing mode only so long as there is text on them.
    I suspect you probably have hammered away at returns, spaces and tabs as well to position things, which only works to add to the mess.
    Download the Pages09_UserGuide.pdf available under the Help menu and swot up a bit on how it works.
    You may find this a usueful resource as well:
    http://www.freeforum101.com/iworktipsntrick/
    Peter
    PS There is quite a lot of programming in OSX that is far from "intuitive". Pages is easy at one level, when using the templates, otherwise it can be quite frustrating.

  • Problem with printing ALV - repetitive page breaks

    Hi,
    I have a problem with ALV during printing or print preview. First, let me describe the situation. My requirement was to have a page break for every Material Number. This was working fine already. However, the user had a change of heart and decided he didn't want to have a page break for every material. Now, they wanted only one page for all materials.
    I thought this was easy to do since I only needed to comment out the SORT (and all codes related to SORT) table that was used to create the page-break. Thing is, it's not working anymore. Although I was able to display one table only, the old page breaks still appear! For example, if there were 7 materials before, therefore, 7 page breaks with 7 blocks of internal tables. Now, only 1 full internal table is displayed while the other 6 are empty! Please help me how to get rid of the other tables or page breaks.
    I hope this is clear. Thanks. I appreciate all the help I can get.

    Amit,
    Using sort option.
    Do one thing. Just create one ALV program with SORT options anf GROUP = '*'.
    Now go to output and save the Variant.  Print the report.
    with out sort option and variant.
    Now come back and Delete the sort options , activate the code.
    And see the output. Choose the variant which you created beofre. and print the report.
    See both the case. it triggeres the same output. you just copy paste it and un comment the commented sort code
    Just test with this code,
    REPORT  zalv_total_sub.
    TYPE-POOLS: slis.
    INCLUDE <icon>.
    DATA: layout TYPE  slis_layout_alv .
    DATA: BEGIN OF it_flight OCCURS 0,
           carrid  LIKE sflight-carrid,
           connid   LIKE sflight-connid,
           fldate   LIKE sflight-fldate,
           seatsmax LIKE sflight-seatsmax,
           seatsocc LIKE sflight-seatsocc,
          END OF it_flight.
    DATA: it_fieldcat TYPE  slis_t_fieldcat_alv,
              wa_fcat LIKE LINE OF it_fieldcat.
    DATA: it_sort TYPE  slis_t_sortinfo_alv,
              wa_sort LIKE LINE OF it_sort.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_internal_tabname     = 'IT_FLIGHT'
        i_inclname               = sy-repid
      CHANGING
        ct_fieldcat              = it_fieldcat
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2.
    SELECT  carrid
           connid
           fldate
           seatsmax
           seatsocc
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_flight
    wa_fcat-do_sum = 'X'.
    MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
    WHERE fieldname = 'SEATSOCC' .
    CLEAR wa_fcat.
    *wa_sort-fieldname = 'CONNID'.
    *wa_sort-up = 'X'.
    *wa_sort-group = '*'.
    *wa_sort-subtot = 'X'.
    *APPEND wa_sort TO it_sort.
    *CLEAR wa_sort.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        i_save                         = 'X'
        i_callback_user_command = 'USER_COMMAND'
        is_layout               = layout
        it_fieldcat             = it_fieldcat
        it_sort                 = it_sort
      TABLES
        t_outtab                = it_flight
      EXCEPTIONS
        program_error           = 1.

  • Problems with applets.

    Hi to everybody.
    I've got a problem with simple applets.
    I've built several applets using Swing components (JApplet, JPanel, JButton, etc.)
    In my browser, the background color of my applets does correctly appear.
    But none of my components does !!!! No text fields, no buttons etc.
    Can someone explain to me which could be the reason of that ?
    Thank's.

    I've just tried appletviewer. And I discovered that there is a problem while trying to acces to a jpeg file for my JBuutons and JLabel.
    Appletviewer considers these files are on the client machine and refuses the acces.
    But when I try my site, the server is my computer too ! So the jpegs are on the server side !
    Furthermore, when I start my web page (that contains my applets), nothing does appear (no exception) in the java console...
    How can I solve this problem (I'm newer with applets)?

  • Problem with Restrict Access to Page with access level using ASP

    I'm using Dreamweaver CS3 with ASP-VBScript and an Access
    database. The pages were created from scratch for this project,
    using those tools all the way through.
    I've created a login page, an admin homepage, and add, edit,
    and list records pages for three tables. The login page uses the
    Server Behavior "Log in User", all other pages use the Server
    Behavior "Restrict Access to Page". All of these are based on an
    Access Level.
    Login seems to work correctly, and redirects to the admin
    homepage. From the admin homepage, I can open any other page as
    expected, and they initially display correctly. On the add and edit
    pages, however,
    submitting the form often results in getting logged out, but
    not always.
    Once this happens, I can log back in, but other problems will
    sometimes occur during that second login session. Sometimes,
    logouts will occur on pages that worked fine during the first login
    session. Sometimes, another session variable that I've setup
    manually will change when it shouldn't...as if there were two
    values stored for my session variable, and reloading the page
    changes to the other value.
    This
    post seems closest to my experience, but it doesn't look like
    there was really an answer beyond "I had to fight with it for a bit
    to get it to work":
    I suspected that there is some problem with session settings
    on the server. We have an almost identical tool on the same server
    that was developed with an older version of DW that works more
    reliably; it sometimes has problems with the initial login, but
    never has a problem after that.
    Has anyone experienced problems like this? Any suggestions
    for what to check? I'm really pulling my hair out since it's so
    unreliable...the kind of problem that goes away when you try to
    show someone and comes back when they leave.

    Hello,
    I was thinking that all I would need would be the username, although username and paswsword would be more secure.  There are about 50 users and no groups or levels.  They are all equal ... same level.
    The website is private and there is a general content area for all users and then there will be private areas for each user where proprietary documents will be held.  I need to be able to ensure that user 'A' can only see the user 'A' pages, user 'B' can only see user 'B', etc.
    I don't really understand what the Dreamweaver script is doing, but the overview sounded like it was the right tool to accomplish what I'm trying to do.
    Any assistance greatly appreciated.
    thanks.

  • Still Having Problems With Applets!!!!

    First i'd like to thank all who responded to my last post regarding a downloadable copy of the J2SE API Documentation. I have downloaded it and am quite content.
    I am still, however having a problem with my applets (all applets at that). Like i said before. I can view any applets i want through the command prompt using appletviewer. My problem is residing in execution directly through Microsoft Internet Explorer 5.x.
    When i open the .html file containing my applet, the file loads in the browser but the applet does nothing. When i mouseover the applet a message is displayed in the browser's status bar stating "loading class. classname: class not found".
    I have tried every applet i can get my hands on including downloaded applets from applet resource sites (even the example applets that came with the JDK1.4 when i downloaded it). They all react the same way, but will execute fine with the direct command prompt reference to appletviewer.
    It's getting very irritating. I have tries everything including setting the classpath in the command prompt. I'm loosing hope of a solution so if anyone might have an idea of what i need to do to fix my problem, or anything i am doing wrong or haven't done, please give me a hint or help.
    I am loving the java language and wish to further my knowledge and farmiliarity with it but i need to make sure everything works.
    Sorry for rambling and i thank whoever offers a reply in advance.
    ChanceH

    1. Check the codebase parameter in the html file that calls the applet
    for example if you have an applet named MyApplet.class inside a directory applets and your html file outside that directory you should have a codebase like this "applets/".
    <applet CODE="MyApplet.class" codebase="applets/" WIDTH=640
    HEIGHT=480 ALIGN= center>
    </applet>
    2. Be sure that your IE support java check the properties and enable the JVM.
    3. If your JVM version does not support Java 2, applets build on Java 2 will not work.

  • Problem with safari loading unselected pages

    I've been having some problems in safari associated with pages loading that weren't selected. I don't believe that any of the pages that I end up on are actually links on the pages I was on. It happens when I'm reading in google reader or in Yahoo reading some of their top stories. I usually end up on a "select a survey question", I am able to hit the back button and get back to the page, but then it will try and forward to the same page I just left.
    I've emptied cache, reset safari, ran the disk utility repair, and while it's an infrequent occurance it happens often enough that I want to fix it.

    Good... you're up to date.
    I think this may be more of a Google Reader issue then Safari. Try the troubleshooting help here.
    http://www.google.com/support/reader/?hl=en
    If you can't resolve the problem there, post back here.
    Carolyn

  • Problem with loading / displaying web pages

    I have a problem with a new laptop that I bought recently, running 64-bit Windows 8, do not know if it will be a driver problem, but I doubt it, the issue is that normally browsing Firefox 22, after a while you start having problems displaying pages which makes it impossible to surf the internet, I attached a screenshot of what happens to me when the problem starts:
    http://i42.tinypic.com/2rneelk.jpg
    I have tried re-installing Firefox, flash player, java, everything but it stays the same, to fix it I have to clear the history and ?cache?, but after a while the same thing happens again. I tried disabling plugins and so I doubt it's hardware problem, the only thing that was initially install ad-block, uninstall it after a while, that may leave me something in Firefox record causes me this problem? Thanks in advance.
    Regards.
    This is NOT my question. Someone posted this question in Spanish, but they aren't getting any help because no one is viewing the question because the question title is not English. I am reposting this question in English so others will help.
    You can view the original question here:
    https://support.mozilla.org/en-US/questions/965988#answer-460939
    Don't worry about translating your answers into Spanish because they are using an online translate to communicate to us in English.
    NOTE: The troubleshooting information on this question is not correct. Go to the original question page to see the accurate information.
    Thank you.

    Hi ComputerWhiz, I posted a reply over in the other thread: https://support.mozilla.org/questions/965988#answer-460944

  • FiOS Digital Voice and Internet Reoccurrin​g Problem with Outage at Same Time Every Night

    I was hoping someone could help me out or enlighten me as to what may be going on. 
    I've been having problems the past two nights (5/17 and 5/18) where at 12:45am CST, both the internet and Digital Voice service go out.  The problem with this is that the outage trips our home alarm due to the dropped connection (which scares our child) and disrupts any large downloads (e.g. Steam purchases) that I may have set up to run during the night. After 5-10 minutes, service is restored and works properly. 
    We haven't had problems of this nature since we switched to digital voice around two months ago, and we tested our alarm system with the provider to ensure it works properly with Digital Voice (it does). 
    Does anyone know if Verizon has been doing backend updates or something of that nature that would knock service out two nights in a row at the same time? 
    I haven't received any information indicating there are outages, planned or otherwise, in our area, and the Verizon support staff I contacted, while polite and courteous, did not have an answer for me.  I am hoping that we don't have to endure a third night of this. 
    Thanks

    To follow up on this, we again had another occurance at 12:45am CST Saturday morning.  Thankfully, though, we did not have another occurance Sunday morning.
    However, I still would like to know what the root cause of this problem is.  I've powercycled my ONT (removed power, removed battery backup) per Verizon support's instructions Friday afternoon, but it did not appear to have any impact on the problem at hand.  

  • Problem with dynamic change a page item value

    Hi,
    I'm trying to dynamically calculated the value of an item based on a simple formula that involves the multiplication of two elements from the same page.
    To do this, create dynamic action as follows:
    Event: Change
    Selection Type: Item(s)
    Item(s): P19_DURATION
    Action: Set value
    Fire on page load: TRUE
    Set Type: SQL Statement
    SQL Statement: SELECT :P19_DURATION * :P19_RATE FROM DUAL
    Page items to submit: P19_DURATION
    Selection Type: Item(s)
    Item(s): P19_AMOUNT
    When altering the P19_DURATION get no change in P19_AMOUNT
    Since my knowledge of javascript is almost zero, I'm trying to do this with pl / sql or sql. Try the dynamic action with a function or a PL / SQL statement and nothing works.
    Have to use javascript for this?
    Searching the forum I think it's something simple, but I did not find an example similar to what I need.
    Regards

    Event: Change
    Selection Type: Item(s)
    Item(s): P19_DURATION
    Action: Set value
    Fire on page load: TRUE
    Set Type: javascript
    javascript Code:
    amount = $v('P19_DURATION') *  $v('P19_RATE');
    $s('P19_AMOUNT',amount);

  • Problem with Applet for Microsoft VM

    Hi there!
    I implemented an applet (first for SUN JVM 1.4.1_02) that has to communicate with a servlet via serialized objects. Therefore the applet sends a request and expects the response :
    //establish connection
    URLConnection l_con= l_url.openConnection();
    l_con.setUseCaches(false);
    l_con.setDoOutput(true);
    l_con.setDoInput(true);
    l_con.setRequestProperty("Content-Type", "application/x-java-serialized-object");
    //send request to servlet               
    ObjectOutputStream l_outputStream = new ObjectOutputStream(l_con.getOutputStream());     
    l_outputStream.writeObject(l_obj);                    
    l_outputStream.flush();               
    l_outputStream.close();
    //get response
    ObjectInputStream l_obInStr = new ObjectInputStream(l_con.getInputStream());
    l_response = (MyResponseClass)l_obInStr.readObject();
    l_obInStr.close();This works absolutely fine for the Sun VM. Now I have to use the Microsoft VM (because I don't want the users to install anything on their clients).
    I compiled the client classes like that:
    javac -target 1.1 classname.javaThe applet starts correctly but there is a problem with the communication that I recognized in the console:
    java.io.IOException: Cannot write output after reading input.
         at com/ms/net/wininet/http/HttpURLConnection.getOutputStream (HttpURLConnection.java)
         at myclass/MyApplet.callToServlet (MyApplet.java:109)
    Does anyone know what this error means ?
    Thanks a lot in advance.

    Hi there!
    I solved my problem by removing all the System.out.println-statements that I used for debugging issues.
    Anyway, I want to know if there are more restrictions concerning this matter for using the Microsoft VM instead of the Sun VM. (Because it HAS worked with the debugging statements with the Sun VM).
    Thank you.

  • Problem with forwarding to new page in jsf

    Hi
    I am facing a problem. I have a checkbox in my jsp page and 3 submit button. The two button works w r t check box and its woking fine. I am getting problem with the 3rd button. I want to fwd to next page once the button is clicked.
    For the check box i am using the method
    public String handleCheckbox2ValueChange(ValueChangeEvent valueChangedEvent)
    Can anyone help me in this regard. I need to fwd to the next page.
    Regards
    Rupesh

    This sounds like a simple JSF navigation that has nothing to do with the checkbox. Read the documentation and tutorials on navigation.

Maybe you are looking for

  • Selection screen -Query

    Hi Gurus: I have a query which has selections form extars tab in the infoset and one selection for language from the selection tab. The problem is that when this selection in teh selection screen from the selection tab is filled with no language(blan

  • AD MA Large Group (9000+ users) export failing due to connectivity timeout:: cd-connectivity-error

    I am currently implementing FIM 2010 in a test environemnt. I have MAs connected to the FIM Portal, an Oracle view, AD, and eDirectory 8.8SP6. All agents are working fine, users attribute flow is working great to all connected systems and groups are

  • Interface Builder Crash on Startup

    Hi, I have installed the latest XCode 3.2.1 and the iPhone SDK for the first time two weeks ago. Right after installation, the Interface Builder has begun coming up with at least one popup window "Assertion failure". Sometimes there are up to 10 popu

  • After iOS 6.1 update no GPS? iPhone 3gs

    GPS fails after ios 6.1 update Tried three diff apps that worked hours before, All fail to respond to GPS speed etc?

  • Why users with E1 license can use Azure Right Management on Office 365?

    Hello All, We have bought 30 E3 Licenses on my office 365 tenant?. However, E1 users can send mail with Azure Right Management policies on Outook? Why does it happens? Regards Jose Osorio