My applet is not working correctly...

I am able to run it easily using Eclipse and it saves the file fine. When I try to run it using firefox, though, it shows the button but does not save the file. It's running offline, I thought I didn't need to JAR it...
import java.awt.Container;
import java.io.File;
import java.io.PrintStream;
import javax.swing.*;
public class SaveTest extends JApplet
     public JButton Button;
     public void init()
          Button = new JButton("Test...");
          Container mainWindow = getContentPane();
          mainWindow.add(Button);
          try
               File f1 = new File("C:\\Program Files\\SaveTest.txt");
               PrintStream out = new PrintStream(f1);
               out.println("This is a folder test.\nTest.\n\nTest.");
          catch(Exception e) { System.out.println("Exception: " + e); }
}

If you use an IDE, it creates a jar for your code and signs the jar for you. When you want to test your code in a browser, you need to sign it before.
Hope it helps: [Signing Code and Granting It Permissions|http://java.sun.com/docs/books/tutorial/security/toolsign/index.html]

Similar Messages

  • I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is click event message box will not working correct

    I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is button click event message box or popup window will not working correctly. Please any one suggest me the steps to overcome this not responding or slowness in the responding problem of Button click event.

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and protect users from unintentially damaging their Firefox, the option to disable JavaScript was removed from the Firefox Options window.
    However, the option to disable JavaScript was not removed from Firefox entirely. You can still access it from about:config or by installing an add-on.
    '''about:config'''
    # In the address bar, type "about:config" (with no quotes), and press Enter.
    # Click "I'll be careful, I promise"
    # In the search bar, search for "javascript.enabled" (with no quotes).
    # Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
    To Re-enable JavaScript, repeat these steps.
    '''Add-ons'''
    You can alternatively install an add-on that lets you disable JavaScript, such as
    *[https://addons.mozilla.org/firefox/addon/noscript/ No-Script] (to disable JavaScript on a per page basis, as required)
    *[https://addons.mozilla.org/firefox/addon/quickjava/ QuickJava] (to easily disable and enable JavaScript, automatic loading of images, and other content)
    Thank you and I hope this helps!

  • Sorting not working correctly for date field in alv report

    Hi All,
    My report displays many rows also containing date type fields of bldat,budat .
    When I sort the report selecting field of type bldat budat the sorting is not correct for the year.
    Ex:
    Invoice doc dat
    01-25-2011
    01-21-2011
    02-02-2011
    10-25-2010
    11-20-2010
    If I use ascending then it is sorted as :
    Invoice doc dat
    01-21-2011
    01-25-2011
    02-02-2011
    10-20-2010
    10-25-2010
    Why the sorting is not working correct for year.(2010 records should have been first).
    The field wa_tab-bldat is of type char10.
    It is populated as wa_tab-bldat = bsak-bldat.
    Kindly suggest what can be done.

    The field wa_tab-bldat is of type char10
    Then what it does is correct.
    Refer to type datum...it will work

  • If statement within a view is not working correctly ?

    Hi all,
    maybe i am wrong but i think the if statement within a view is not working correctly. See code down below.
    I would like to use the Hallo World depending on the page attribute isFrame with or without all the neccessary html tags. Therefore i have embedded the htmlb tags in an if statement. But for any reason if isframe is initial it isn't working. It would be great if anybody could help me.
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if not isframe is initial. %>
      <htmlb:content design="design2003">
         <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    hallo world
    <% if not isframe is initial. %>
         </htmlb:page>
      </htmlb:content>
    <% endif. %>
    thanks in advance and best regards
    Matthias Hlubek

    Matthias,
    The short answer: your example is <b>NOT</b> going to work. The long answer will probably 5 pages to describe. So first let me rewrite the example so that it could work, and then give a short version of the long answer. Do not be disappointed if it is not totally clear. It is rather complicated. (See the nice form of IF statements that are possible since 620.)
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <% if isframe is <b>NOT</b> initial. %>
    <htmlb:content design="design2003">
      <htmlb:page title = "Top Level Navigation view">
        hallo world
      </htmlb:page>
    </htmlb:content>
    <% else. %>
      hallo world
    <% endif. %>
    So why does your example not work? Let us start with a simple tag:
      <htmlb:page title = "Top Level Navigation view">
      </htmlb:page>
    Now, for each tag, we have effectively the opening part (<htmlb:page>), an optional body, and then the closing part (</htmlb:page>). We are now at the level of the BSP runtime processing one tag. What the runtime does not know, is whether the tag wants to process its body or not. Each tag can decide dynamically at runtime whether the body should be processed. So the BSP compiler generates the following code:
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
      ENDIF.
      tag->DO_AT_END( ).
    You should actually just debug your BSP code at ABAP level, and then you will immediately see all of this. Now, let us mix in your example with our code generation. First you simplified example:
    <% if isframe is NOT initial. %>
      <htmlb:page title = "Top Level Navigation view">
    <% endif. %>
    <% if isframe is NOT initial. %>
      </htmlb:page>
    <% endif. %>
    And then with our generated code. Look specifically at how the IF/ENDIF blocks suddenly match!
    if isframe is NOT initial.
      DATA: tag TYPE REF TO cl_htmlb_page.
      CREATE OBJECT tag.
      tag->title = 'Top Level Navigation view'.
      IF tag->DO_AT_BEGINNING( ) = CONTINUE.
    endif.
    if isframe is NOT initial.
      ENDIF.
      tag->DO_AT_END( ).
    endif.
    You can see that your ENDIF statements are closing IF blocks generated by the BSP compiler. Such a nesting will not work. This is a very short form of the problem, there are a number of variations, and different types of the same problem.
    The only way to solve this problem, is probably to put the body into a page fragment and include it like I did above with the duplicate HelloWorld strings. But this duplicates source code. Better is to put body onto a view, that can be processed as required.
    brian

  • ** Filtering is not working correctly in ALV (REUSE_ALV_GRID_DISPLAY)

    Hi Friends,
    We have one Z report that output is displayed in ALV. We are using the standard FM 'REUSE_ALV_GRID_DISPLAY. 
    We have requirement to remove leading zeros for the field like Material Number (MATNR), Equipment Number (EQUNR) etc. We did the changes by applying the field catalog properties as below.
    lw_fieldcat-lzero = space.
    lw_fieldcat-no_zero = 'X'.
    After this, the MATNR and EQUNR is displayed correctly in the ALV. (Leading zeros are suppressed). But, when we do filter for these fields, in the filter window it displays all the values with leading zeros.
    1. We don't understand why it is showing in the Filter widow with all leading zeros. All it shows all the records instead of unique items.
    Later on, we removed the above fieldcat coding. Then, we have called the CONVERSION_EXIT routines (in the domain) for the fields to remove leading zeros.
    Now, the MATNR and EQUNR is displayed correctly (without leading zeros) in ALV. When we do filter, it is also doing filtering correctly. But, when we do filter which have EQUNR having long values (after zero suppression), it is not working correctly. i.e no items are displayed in the ALV.
    Not only for this items. If we filter character columns which have long text, it is not filtering correctly.
    2. It is not able to understand why the filtering is not working for long items. But in the standard report, the filtering is working correctly.
    We are using SAP ECC 6.0.
    Friends, can you clarify the about doubts. It is surprising for me.
    Kind regards,
    Jegathees P.
    Our customer is asked to remove the leading zeros for the numeric field

    Hi Clemens Li
    I agreed on your point. When we define the Internal table the type for element EQUNR & QUMNR , we are referring the SAP data element for EQUNR, QMNUM field.
    Our doubt is even though we refer the standard data element, in the ALV display, it shows with leading zeros and also it creates problems in the filtering and in the filter window all values instead of unique nos.
    Hi Abhii
    I have given below the fieldcat coding.
    Friends, can you kindly clarify the above said problems. Since we use SAP ECC 6.0 any notes or patches apply is required. ( this is the basic functionality in ALV, that is my doubt).
        wls_fieldcat-col_pos   = wpv_pos.
        wls_fieldcat-fieldname = wpv_champ.
        wls_fieldcat-tabname   = wlc_tabname.
      wls_fieldcat-seltext_s = wls_fieldcat-seltext_m
        wls_fieldcat-seltext_l = wpv_libelle.
        wls_fieldcat-ddictxt   = 'L'.
        wls_fieldcat-no_out    = wv_no_out.
        APPEND wls_fieldcat TO gt_fieldcat.
    Kind regards,
    Jegathees P.

  • Key Figure calculation in Abap is not working correctly - Overlooping

    Hi,
    I wrote a logic to calculate the ratio of key figure but it is not working correctly
    For example I have a requirement to split 1 Product into Several new Products and also the Net Amount will be splitted to these several new products as well. The total Amount of the new product will be equivalent to the Net Amount.
    So far my Logic is splitting the product to several new products but the amount is incorrect as the calculation is over looping.
    Sample
    A PRODUCT has Net Amount 1000. And this product needs to be splitted into 3 new products. Each of this new product is assigned a ratio of 0.3, 0.2 and 0.7 respectively. total sum of the ratio is 1.
    PRODUCT1 0.3 = 1000 * 0.3 = 300
    PRODUCT2 0.2 = 1000 * 0.2 = 200
    PRODUCT3 0.7 = 1000 * 0.7 = 700
    The total amount of this new products is 1000.
    Now my logic is working this way.
    PRODUCT1 0.3 = 1000 * 0.3 = 300
    PRODUCT2 0.2 = 1000 * 0.2 * 0.3 = 60
    PRODUCT3 0.7 = 1000 * 0.2 * 0.3 * 0.7 = 42
    Only the PRODUCT1 is working correctly and there is overlooping for the remaining products
    Logic used
    DATA: t_data TYPE data_package_structure OCCURS 0 WITH HEADER LINE.
    DATA: t_newdso LIKE /bic/newdso OCCURS 0 WITH HEADER LINE.
    DATA: t_olddso LIKE /bic/olddso OCCURS 0 WITH HEADER LINE.
    DATA: amount LIKE data_package-netamount.
    DATA: zidx LIKE sy-tabix.
    REFRESH t_data.
    LOOP AT data_package.
      zidx = sy-tabix.
      MOVE-CORRESPONDING data_package TO t_data.
      REFRESH t_newdso.
      SELECT * FROM newdso INTO TABLE t_newdso WHERE prod =
      data_package-prod.
      SORT t_newdso BY prod.
    *LOOP AT T_NEWDSO.
      READ TABLE t_newdso WITH KEY prodh4 = t_data-prod.
      IF sy-subrc EQ 0.
        LOOP AT t_newdso.
          t_data-prod = t_newdso-/bic/znew_mp.
          t_data-material = t_newdso-material.
    *T_DATA-NETAMOUNT = T_DATA NETAMOUNT * T_NEWDSO-/BIC/ZSP_RATIO.*
          APPEND t_data.
        ENDLOOP.
      ELSE.
        REFRESH t_olddso.
        SELECT * FROM olddso INTO TABLE t_olddso WHERE prod =
        data_package-prod.
        SORT t_olddso BY prod.
        READ TABLE t_olddso WITH KEY prodh4 = t_data-prod.
        t_data-prod = t_olddso-prod.
        t_data-material = t_olddso-material.
        APPEND t_data.
      ENDIF.
      MODIFY data_package INDEX zidx.
    ENDLOOP.
    REFRESH data_package.
    data_package[] = t_data[].
    thanks
    Edited by: Matt on Sep 27, 2010 2:25 PM - added  tags

    Hi,
    I am not really good at debugging Abap code since I am a newbie. however  I have tried to add CLEAR T_DATA before the first loop.
    REFRESH T_DATA.
    LOOP AT DATA_PACKAGE.
    ZIDX = SY-TABIX.
    MOVE-CORRESPONDING DATA_PACKAGE TO T_DATA.
    and before the second loop and select statement and at the end of the loop.
    REFRESH T_NEWDSO.
    SELECT * FROM NEWDSO INTO table T_NEWDSO WHERE PROD =
    DATA_PACKAGE-PROD.
    SORT T_NEWDSO BY PROD.
    READ TABLE T_NEWDSO WITH KEY PROD = T_DATA-PROD.
    IF sy-subrc EQ 0.
    LOOP AT T_NEWDSO.
    but then not all data are being fetched.
    thanks
    Edited by: Bhat Vaidya on Sep 28, 2010 8:33 AM

  • Email pushing not working correctly for office email - 3 seperate devices/carriers

    We switched email hosts several months ago and since our email pushing has not worked correctly. Our host/IT guy has been very unwilling to help me through this (I get the pleasure of being the in-house IT source)
    I personally am on AT&T have no problems with the other 3 emails I have set up on my blackberry. However I receive my work account one time a day at roughly 6:15. Another user is on Alltel and he receives spotty emails throughout the day, but his gmail account comes through instantly. The third user is on nextel and he receives his 2-3 times per day.
    I began to think this was an email host issue since the three of us are all on different carriers, until I found out a fourth user, also on nextel, receives his emails fine.
    Users 1-3 are on Outlook 07 on various versions of the Curve. We have all our messages to stay on the server.
    User 4 is on the older nextel blackberry push to talk, and is not on outlook. 
    We do not have an exchange server. Our emails were all set up through our devices.
    Any suggestions? The answers I have received through our carriers is to make sure that our messages are set to be left on the server. Everyone else at the office has given up - but for me this is the quest for the Holy Grail.......I'm determined find the answer!
    Thank you in advance for any suggestions.
    Caitlin Talbot 

    Potential solution for windows for a side-by-side install. This works for me.
    To setup a firefox install side by side so that links from external programs (like email) can open (so you don't get a "Firefox is already running but is not responding" message) do the following.
    The solution entails the use of the -no-remote switch. Don't use it for the default browser. Use it for the non default browser.
    I'll use firefox 3.6 and firefox 4.0 as examples but this should work for future versions.
    + Install firefox 3.6 and Firefox 4.0 in different directories. Eg.
    C:\Program Files\Mozilla Firefox\firefox.exe
    C:\Program Files\Mozilla Firefox 4\firefox.exe
    + Open profile manager. Start > Run : firefox.exe -ProfileManager
    + In profile manager create Two Profiles.
    firefox3.6
    firefox4
    + In profile manager select firefox 4 as your default (assuming you want to default to the latest) and tick "Don't ask at startup"
    + Create two windows shortcuts.
    * General: Mozilla Firefox 4 (default). Shortcut > Target: "C:\Program Files\Mozilla Firefox 4\firefox.exe". Shortcut > Start In: "C:\Program Files\Mozilla Firefox 4"
    * General: Mozilla Firefox 3.6. Shortcut > Target: "C:\Program Files\Mozilla Firefox\firefox.exe" -p firefox3.6 -no-remote. Shortcut > Start In: "C:\Program Files\Mozilla Firefox"
    That's it. Links from external programs should now open in your default browser.
    Further details see. [http://kb.mozillazine.org/Opening_a_new_instance_of_your_Mozilla_application_with_another_profile Opening a new instance of your Mozilla application with another profile]

  • I bought an IPAD air from state and the screen is not working correctly and right now i'm in Egypt ,can i send my ipad to service in Egypt and the warranty will work in Egypt or what?

    i bought an IPAD air (32 gb wifi only) from USA just one month ago and the screen is not working correctly(picture attached) and right now i'm in Egypt ,can i send my ipad to service in Egypt and the warranty will work in Egypt or what?

    Have you tried a soft-reset to see if that fixes it ? You might be able to get warranty service in Egypt for your iPad, but the warranty includes :
    IMPORTANT RESTRICTION FOR iPHONE AND iPAD SERVICE.
    Apple may restrict warranty service for iPhone and iPad to the country where Apple or its Authorized Distributors originally sold the device.
    As it's wifi-only you should have a better chance of it being serviced under warranty, but there are no guarantees, it might depend upon the repairer.
    Egypt authorised service providers : https://locate.apple.com/eg/en/

  • SSRS 2008 R2/SSRS 2012 Tab Delimited setup is not working correctly in Report Designer

    I have changed a RSReportDesigner.config to add a tab delimited option for report export, but it is not working correctly in vs2008/vs2010 report designer. I get a duplicate of CSV (comma delimited) in the export dropdown list.
    I have tested SSRS 2008 R2/SSRS 2012 on Windows 7 64 bit professional.
    It is working correctly in the report manager.
    <Extension Name="TAB" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
            <OverrideNames>
                <Name Language="en-US">TAB delimited</Name>
            </OverrideNames>
            <Configuration>
                <DeviceInfo>
                    <FieldDelimiter xml:space="preserve">&#9;</FieldDelimiter>
                    <Encoding>ASCII</Encoding>
                    <UseFormattedValues>False</UseFormattedValues>
                    <NoHeader>False</NoHeader>
                    <FileExtension>TXT</FileExtension>
                </DeviceInfo>
            </Configuration>
          </Extension>

    Hi Dave0323,
    According to your description, you want to export your report into TXT file and change the delimiter to be a Tab. Right?
    In Reporting Services, when exporting to a CSV file, we can change the default field delimiter to any character that we want, including TAB, by changing the device information settings in the configuration file. For example, to use TAB,
    update the FieldDelimiter setting to <FieldDelimiter xml:space="preserve">[TAB]</FieldDelimiter>. And we can change the FileExtension to be TXT if we want to export it into a TXT file. So in this scenario, we just need to modify the configuration
    file like below:
    The result looks like below:
    Reference:
    CSV Device Information Settings
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Web Cam applet is not working in great consistency

    Hi... My video capturing applet is not working very well.
    The image stream is displayed on the web page in JPEG format with 0.5 quality. However, it crashes after a while and the it does not release the vfw resource.
    I have to restart my machine in order to execute it again.
    Can anyone please help?
    Thanks.
    Carter

    Ok. Thanks.
    Sender Applet
    import javax.swing.*;
    import java.io.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    /*<applet code="myGUIApplet.class" width="300" height="300"></applet>*/
    public class myGUIApplet extends JApplet implements ActionListener
         private JPanel bottom=new JPanel();
         private JPanel centVisual=new JPanel();
         private JPanel connectionAddress=new JPanel();
         private JButton capture=new JButton("Start Capturing");
         private JButton stops=new JButton("Stop");
         private JMenuBar menubar=new JMenuBar();
         private JMenu file=new JMenu("file");     
         private JMenuItem fileItem1=new JMenuItem("Exit");
         private JLabel serverip=new JLabel("Server IP");
         private JTextField setIP=new JTextField();
         public static JTextField ServerInfo=new JTextField();
         private MyTransmitter mytrans;
         private String ip;
         public static final String DEFAULT_MULTICAST_IP="226.10.10.20";
         public static final String DEFAULT_PORT="80";
         public void init()
              //setSize(400,400);               
              setLayout(new BorderLayout());
              menubar.add(file);
              file.add(fileItem1);
              bottom.setLayout(new BorderLayout());
              bottom.setBackground(Color.black);
              bottom.add("West",capture);
              bottom.add("East",stops);
              connectionAddress.setLayout(new BorderLayout());
              connectionAddress.add("North",serverip);
              connectionAddress.add("South",setIP);
              ServerInfo.setEditable(false);
              connectionAddress.add("Center",ServerInfo);
              setIP.addActionListener(this);
              setIP.setText("");
              capture.setBackground(Color.lightGray);
              capture.addActionListener(this);
              stops.addActionListener(this);
              fileItem1.addActionListener(this);
              add("South",bottom);
              add("North",menubar);     
              add("Center",connectionAddress);          
         public void actionPerformed(ActionEvent ae){
              Object source=ae.getSource();
              if(source==capture){
              if(setIP.getText().equals(""))
                        ip=DEFAULT_MULTICAST_IP;
              else{
                   ip=setIP.getText();
                   if(mytrans!=null){
                        mytrans.stopTransmitter();
                        mytrans=null;                         
                   System.out.println(" - Connecting to "+ip+" port: "+DEFAULT_PORT);
                   ServerInfo.setText(" - Connecting to "+ip+" port: "+DEFAULT_PORT);
                   mytrans=new MyTransmitter(ip,DEFAULT_PORT,ServerInfo);
                   mytrans.start();               
              if(source==stops){
                   if(mytrans!=null)
                        mytrans.stopTransmitter();
                   System.exit(0);
              if(source==fileItem1){
                   if(mytrans!=null)
                        mytrans.stopTransmitter();     
                   System.exit(0);
         public void destroy(){
              if(mytrans!=null){
                   mytrans.stopTransmitter();
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import java.util.*;
    import java.net.InetAddress;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.format.*;
    import javax.media.control.TrackControl;
    import javax.media.control.QualityControl;
    import javax.media.rtp.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.rtp.*;
    import java.io.InputStream;
    import javax.media.rtp.RTPManager;
    public class MyTransmitter extends Thread
         private MediaLocator videoLocator;
         private String ipAddress;
         private int basePort;
         private Integer stateLock=new Integer(0);
         private boolean failure;
         private Processor processor;
         private DataSource videoDataInput,videoDataOutput;
         private RTPManager rtpMgrs[];
         private VideoFormat JPEG_VIDEO=new VideoFormat(VideoFormat.JPEG_RTP);
         private SendStream sendStream;
         private SourceDescription descriptionList[];
         private JTextField infoField;
         public MyTransmitter(String ips,String ports,JTextField ServerInfo){
              infoField=ServerInfo;
              ipAddress=ips;
              Integer bPort=Integer.valueOf(ports);
              if(bPort!=null)
                   basePort=bPort.intValue();
         public void run()
              initializeVideo();
              if(videoLocator!=null){
                   createMyProcessor();
                   createMyManager();
              // May be should put inside the if..else statements
              //createMyTransmitter();
         // Initailize the video
         public void initializeVideo()
              // Stre the devices in a vector
              VideoFormat format=new VideoFormat(VideoFormat.RGB);
              Vector deviceList=CaptureDeviceManager.getDeviceList(format);
              CaptureDeviceInfo deviceInfo=null;
              // If there is more than one device detected
              if(deviceList.size()>0){
                   // Set the first device to device Info
                   // GEt the media locator of the devie
                   deviceInfo=(CaptureDeviceInfo)deviceList.elementAt(0);
                   videoLocator=deviceInfo.getLocator();
              }else{
                   System.out.println(" --X No device found...");
                   infoField.setText(" --X No device found...");
         public void createMyProcessor()
              boolean result=false;
              DataSource ds=null;
              // Check if the media locator is null
              if(videoLocator==null){
                   System.out.println(" --X No video locator..");
                   infoField.setText(" --X No video locator...");
              System.out.println(" - Trying to create a Processor..");
              infoField.setText(" - Trying to create a Processor..");
              // Attempt to create DataSource from media locator
              try{
                   ds=Manager.createDataSource(videoLocator);
              }catch(Exception ex){
                   System.out.println(" --X Unable to create dataSource : "+ex.getMessage());
              System.out.println(" - Video data source is created..");
              infoField.setText(" - Video data source is created..");
              // Try to create Processor from DataSource
              try{
                   processor=Manager.createProcessor(ds);
              }catch(NoProcessorException npe){
                   System.out.println(" --X Unable to create Processor: "+npe.getMessage());
                   infoField.setText(" --X Unable to create Processor: "+npe.getMessage());
              catch(IOException ioe){
                   System.out.println(" --X IOException creating Processor..");
                   infoField.setText(" --X IOException creating Processor..");
              // Wait for the processor to be configured
              result=waitForState(processor,Processor.Configured);
              if(result==false){
                   System.out.println(" --X Could not configure processor..");
                   infoField.setText(" --X Could not configure processor..");
              // Set the track controls for processor
              TrackControl []tracks=processor.getTrackControls();
              if(tracks==null || tracks.length<1){
                   System.err.println(" --X No track is found..");
                   infoField.setText(" --X No track is found..");
              // Set the content description of processor to RAW_RTP format
              // This will limit the supported formats to reported from
              // Track.getSupportedFormats() to valid RTP format
              ContentDescriptor cdes=new ContentDescriptor(ContentDescriptor.RAW_RTP);
              processor.setContentDescriptor(cdes);
              Format []supported;
              Format chosen=null;
              boolean atLeastOneTrack=false;
              for(int i=0;i<tracks.length;i++){
                   Format format=tracks.getFormat();
                   if(tracks[i].isEnabled()){
                        supported=tracks[i].getSupportedFormats();
                        // WE've set the output content to RAW_RTP.
                        // So, all the supporte formats should work with RAW_RTP.
                        // We will pick the first one.
                        if(supported.length>0){
                             if(supported[0] instanceof VideoFormat){                              
                                  chosen=checkVideoSize(tracks[i].getFormat(),supported[0]);
                             }else
                                  chosen=supported[0];
                             tracks[i].setFormat(chosen);
                             System.out.println(" Track "+i+" is transmitted in "+chosen+" format.. ");
                             infoField.setText(" Track "+i+" is transmitted in "+chosen+" format.. ");
                             atLeastOneTrack=true;
                        }else{
                             // If no format is suitable, track is disabled
                             tracks[i].setEnabled(false);
                   }else
                        tracks[i].setEnabled(false);          
              if(!atLeastOneTrack)
                   System.out.println("atLeastOneTrack: "+atLeastOneTrack);
                   System.out.println(" --X Could Not find track to RTP format..");
                   infoField.setText("atLeastOneTrack: "+atLeastOneTrack);
                   infoField.setText(" --X Could Not find track to RTP format..");
              result=waitForState(processor,Controller.Realized);
              if(result==false){
                   System.out.println(" --X Could NOT realize processor...");
                   infoField.setText(" --X Could NOT realize processor...");
              // Set the JPEG Quality to value 0.5
              setJPEGQuality(processor,0.5f);
              // Set the output Data Source
              videoDataOutput=processor.getDataOutput();
              //Start the processor
              processor.start();          
         public void setJPEGQuality(Processor p,float values)
              Control []cs=p.getControls();
              QualityControl qc=null;
              VideoFormat JPEGFmt=new VideoFormat(VideoFormat.JPEG);
              // Loop through the ocntrols to find the Quality control for the JPEG encoder
              for(int i=0;i<cs.length;i++){
                   if(cs[i] instanceof QualityControl && cs[i] instanceof Owned){
                        Object owner=((Owned)cs[i]).getOwner();
                        // Check if the owner is the Codec
                        // Check the format of output as well
                        if(owner instanceof Codec){
                             Format fmts[]=((Codec)owner).getSupportedOutputFormats(null);
                             // Loop through the supported format and set the quality to 0.5
                             for(int j=0;j<fmts.length;j++){
                                  qc=(QualityControl)cs[i];
                                  qc.setQuality(values);
                                  System.out.println(" - Quality is set to "+values+" on "+qc);
                                  infoField.setText(" - Quality is set to "+values+" on "+qc);
                                  break;
                   if(qc!=null)
                        break;
         public Format checkVideoSize(Format originalFormat,Format supported)
              int width,height;
              Dimension size=((VideoFormat)originalFormat).getSize();     
              Format jpegFormat=new Format(VideoFormat.JPEG_RTP);
              Format h263fmt=new Format(VideoFormat.H263_RTP);
              if(supported.matches(jpegFormat)){
                   width=(size.width%8 == 0 ? size.width:(int)(size.width%8)*8);
                   height=(size.height%8 == 0 ? size.height:(int)(size.height%8)*8);
              }else if(supported.matches(h263fmt)){
                   if(size.width<128){
                        width=128;
                        height=96;
                   }else if(size.width<176){
                        width=176;
                        height=144;
                   }else{
                        width=352;
                        height=288;
              }else{
                   // Unknown format, just return it.
                   return supported;
              return (new VideoFormat(null,new Dimension(width,height),Format.NOT_SPECIFIED,null,Format.NOT_SPECIFIED)).intersects(supported);
         public boolean waitForState(Processor p,Integer status)
              p.addControllerListener(new StateListener());
              failure=false;
              if(status==Processor.Configured){
                   p.configure();               
              }else if(status==Processor.Realized){
                   p.realize();
              //Wait until an event that confirms the success of the method, or failure of an event
              while(p.getState()<status && !failure){
                   synchronized(getStateLock()){
                        try{
                             // Wait
                             getStateLock().wait();
                        }catch(InterruptedException ie){
                             return false;
              if(failure)
                   return false;
              else
                   return true;
         public Integer getStateLock(){
              return stateLock;
         public void setFailure(){
              failure=true;
         public void createMyManager()
              SessionAddress destAddress;
              InetAddress ipAddr;
              int port;
              SourceDescription srcDesList[];
              PushBufferDataSource pbds=(PushBufferDataSource)videoDataOutput;
              PushBufferStream pbss[]=pbds.getStreams();          
              rtpMgrs=new RTPManager[pbss.length];          
              for(int a=0;a<pbss.length;a++){
              try{
                   // RTP Managers or RTP Manager?????
                   rtpMgrs[a]=RTPManager.newInstance();
                   port=basePort;
                   ipAddr=InetAddress.getByName(ipAddress);
                   SessionAddress localAddr=new SessionAddress(InetAddress.getLocalHost(),port+20);
                   destAddress=new SessionAddress(ipAddr,port,1);
                   Integer myipprefix=Integer.valueOf(ipAddress.substring(0,3));
                   if((myipprefix.intValue()>223) && (myipprefix.intValue()<240)){
                        rtpMgrs[a].initialize(destAddress);
                   }else{
                        rtpMgrs[a].initialize(localAddr);
                   rtpMgrs[a].addTarget(destAddress);
                   System.out.println(" Created RTP session: "+ipAddress+" "+port+" to "+destAddress);
                   infoField.setText(" Created RTP session: "+ipAddress+" "+port+" to "+destAddress);
                   if(videoDataOutput!=null){
                        sendStream=rtpMgrs[a].createSendStream(videoDataOutput,0);
                        sendStream.start();
                        System.out.println(" RTP stream is started..");
                        infoField.setText(" RTP stream is started..");
              }catch(UnsupportedFormatException ex){
                   System.out.println(" --X Unsupported Format : "+ex);
                   infoField.setText(" --X Unsupported Format : "+ex);
              catch(IOException ioe){
                   System.out.println(" --X IOException : "+ioe.getMessage());
                   infoField.setText(" --X IOException : "+ioe.getMessage());
              catch(Exception ex){
                   System.out.println(" --X Unable to create RTP Manager...");
                   System.out.println(ex.getMessage());
                   infoField.setText(" --X Unable to create RTP Manager..."+ex.getMessage());
         /*public void createMyTransmitter()
         try{
              if(videoDataOutput!=null){
                   sendStream=rtpMgrs[i].createSendStream(videoDataOutput,0);
                   sendStream.start();
         }catch(UnsupportedFormatException ex){
                   System.out.println(" --X Unsupported Format : "+ex);
                   infoField.setText(" --X Unsupported Format : "+ex);
         catch(IOException ioe){
                   System.out.println(" --X IOException : "+ioe.getMessage());
                   infoField.setText(" --X IOException : "+ioe.getMessage());
         public void stopTransmitter(){
              if(processor!=null){
                   processor.stop();
                   processor.close();
                   processor=null;
                   // Loop through RTP Managers and close all managers..
                   // Dispose them for garbage collection
                   for(int i=0;i<rtpMgrs.length;i++){
                        rtpmgrs[i].removeSendStream(this);
                        rtpMgrs[i].removeTargets("Session ended..");
                        rtpMgrs[i].dispose();
                   //rtpMgrs.removeTargets("Session ended..");
                   //rtpMgrs.dispose();
         * StateListener class to handle Controller events
         class StateListener implements ControllerListener{
              public void controllerUpdate(ControllerEvent ce){
                   if(ce instanceof ControllerClosedEvent){
                        processor.close();
                   /* Handle all controller events and notify all
                   waiting thread in waitForState method */
                   if(ce instanceof ControllerEvent){
                        synchronized(getStateLock()){
                             getStateLock().notifyAll();
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Client Applet
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.control.BufferControl;
    import javax.media.control.*;
    import javax.media.format.*;
    import javax.media.rtp.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.rtp.event.*;
    import com.sun.media.rtp.RTPSessionMgr;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    import java.net.URL;
    import java.net.Socket;
    /*<applet code="clientPlayerApplet.class" width="400" height="300">
         <param name=ServerIPS value="192.168.0.9">
         <param name=ServerPort value="80">
         <param name=TimeToLive value="1">
         <param name=archive value="clientPlayerApplet.jar">
    </applet> */
    public class clientPlayerApplet extends JApplet implements ControllerListener, ReceiveStreamListener,SessionListener
         String sessions[]=null;
         RTPManager rtpmgrs[]=null;     
         boolean dataReceived=false;
         Object myDataSync=new Object();
         private Player player;
         //private String serveripadd="226.10.10.20";
         //private int serverPort=2020;
         //private int timeToLive=1;
         private JPanel panel;
         private Vector currentParticipant;
         public void init()
              panel=new JPanel();
              setLayout(new BorderLayout());
              add("Center",panel);
              //String[] urls;
              /*urls[0]=getParameter("ServerIPS");
              urls[1]="/";
              urls[2]=getParameter("ServerPort");*/
              String []urls={new String(getParameter("ServerIPS")+"/"+getParameter("ServerPort")+"/"+getParameter("TimeToLive"))};
              sessions=urls;          
              initializePlayer();
         public void initializePlayer(){
              try{
                   InetAddress ipAddr;
                   SessionAddress localAddr=new SessionAddress();
                   SessionAddress destAddr;
                   rtpmgrs=new RTPManager[sessions.length];
                   currentParticipant=new Vector();
                   //rtpmgrs=new RTPManager();
                   SessionLabel session=null;
                   //Open RTP session
                   for(int i=0;i<sessions.length;i++){
                        try{
                             session=new SessionLabel(sessions[i]);
                             //session=new SessionLabel(sessions);
                        }catch(IllegalArgumentException iae){
                             System.out.println(" --X Unable to parse the sesion address given");     
                        System.out.println(" - Open RTP session for "+session.port);
                        rtpmgrs[i]=(RTPManager) RTPManager.newInstance();               
                        rtpmgrs[i].addSessionListener(this);
                        rtpmgrs[i].addReceiveStreamListener(this);
                        ipAddr=InetAddress.getByName(session.addr);
                        if(ipAddr.isMulticastAddress()){
                             localAddr=new SessionAddress(ipAddr,session.port,session.ttl);
                             destAddr=new SessionAddress(ipAddr,session.port,session.ttl);
                        }else{
                             localAddr=new SessionAddress(InetAddress.getLocalHost(),session.port);     
                             destAddr=new SessionAddress(ipAddr,session.port);
                        rtpmgrs[i].initialize(localAddr);
                        BufferControl bc=(BufferControl)rtpmgrs[i].getControl("javax.media.control.BufferControl");
                        if(bc!=null)
                             bc.setBufferLength(600);
                        rtpmgrs[i].addTarget(destAddr);
              }catch(Exception ex){
                   System.out.println(" --X Cannot create RTP Session "+ex.getMessage());
              long currentTime=System.currentTimeMillis();
              long waitingDuration=10000;
              try{
                   synchronized(myDataSync){
                        while(!dataReceived && (System.currentTimeMillis() - currentTime < waitingDuration)){
                             if(!dataReceived){
                                  myDataSync.wait(1000);
              }catch(Exception ex){
                   System.out.println(" --X myDataSync interrupted...");
              if(!dataReceived){
                   System.out.println(" No RTP Stream Data is received.." );               
         public void destroy()
              for(int i=0;i<currentParticipant.size();i++){
                   //if(player!=null)
                        ((MyPlayList)currentParticipant.elementAt(i)).close();
              // Loop through the RTP Managers
              // -> Remove the stream listener
              // -> Remove the target address
              // -> Dispose the RTP Manager for garbage collection
              currentParticipant.removeAllElements();
              for(int i=0;i<rtpmgrs.length;i++){
                   if(rtpmgrs[i]!=null){
                        rtpmgrs[i].removeReceiveStreamListener(this);
                        rtpmgrs[i].removeTargets(" Closing session..");
                        rtpmgrs[i].dispose();
                        rtpmgrs[i]=null;
         MyPlayList find(Player pl){
              for(int i=0;i<currentParticipant.size();i++){
                   MyPlayList mpl=(MyPlayList)currentParticipant.elementAt(i);
                   if(mpl.clientPlay==pl)
                        return mpl;
              return null;
         MyPlayList find(ReceiveStream rs){
              for(int i=0;i<currentParticipant.size();i++){
                   MyPlayList mpl=(MyPlayList)currentParticipant.elementAt(i);
                   if(mpl.stream==rs)
                        return mpl;
              return null;
         *     ReceiveStream Listener function                    *
         public synchronized void update(ReceiveStreamEvent rse)
              RTPManager mgr=(RTPManager)rse.getSource();
              ReceiveStream stream=rse.getReceiveStream();
              Participant participant=rse.getParticipant();
              if(rse instanceof RemotePayloadChangeEvent){
                   System.out.println(" -- Received Payload Change Event..");
                   System.out.println(" Sorry, no payload change is allowed.");               
              }else if(rse instanceof NewReceiveStreamEvent){
                   try{
                        // Once the new stream is detected, create the datasource
                        stream=((NewReceiveStreamEvent)rse).getReceiveStream();
                        DataSource outputDS=stream.getDataSource();
                        // Get RTP Controller to find the format
                        RTPControl rtpctl=(RTPControl)outputDS.getControl("javax.media.rtp.RTPControl");
                        if(rtpctl!=null){
                             System.out.println(" -> Received new rtP stream: "+rtpctl.getFormat());
                        }else
                             System.out.println(" -> Received new RTP stream");
                        if(participant!=null){
                             System.out.println(" -> New stream received from: "+participant.getCNAME());
                        }else{
                             System.out.println(" -> New stream detected... ");
                        player=Manager.createPlayer(outputDS);
                        if(player==null)
                             return;
                        System.out.println(" - Player is created...");
                        player.addControllerListener(this);
                        player.realize();
                        // Helper class to identify the player and stream
                        MyPlayList mpl=new MyPlayList(player,stream);
                        // Add the helper class object to Vector
                        currentParticipant.addElement(mpl);
                        // Notify initializePlayer() that a new stream has arrived
                        synchronized(myDataSync){
                             dataReceived=true;
                             myDataSync.notifyAll();
                   }catch(Exception ex){
                        System.out.println(" --X NewReceiveStream Exception: "+ex.getMessage());
                        return;
              }else if(rse instanceof ByeEvent){
                   System.out.println(" - BYE packet received from "+participant.getCNAME());
                   MyPlayList mpls=find(stream);
                   if(player!=mpls){
                        mpls.close();
                        currentParticipant.removeElement(mpls);
                   if(mgr!=null){
                        mgr.removeReceiveStreamListener(this);
                        mgr.removeTargets(" Closing session..");
                        mgr.dispose();
                        mgr=null;
              }else if(rse instanceof StreamMappedEvent){
                   if(stream!=null && stream.getDataSource()!=null){
                        DataSource myds=stream.getDataSource();
                        RTPControl rtpctrl=(RTPControl)myds.getControl("javax.media.rtp.RTPControl");
                        System.out.println(" -> The previously unidentified stream ");
                        if(rtpctrl!=null)
                             System.out.println(" "+rtpctrl.getFormat());
                        System.out.println(" has been identified as sent by :"+participant.getCNAME());
         *           Session Listener
         public void update(SessionEvent sesevt)
              if(sesevt instanceof NewParticipantEvent){
                   Participant part=((NewParticipantEvent)sesevt).getParticipant();
                   System.out.println(" -> A new partcipant has joined :"+part.getCNAME());
         *     ControllerListener for Players          
         public synchronized void controllerUpdate(ControllerEvent ce)
              Player p=(Player)ce.getSource();
              if(p==null)
                   return;
              if(ce instanceof RealizeCompleteEvent){
                   MyPlayList mpls=find(p);
                   if(mpls!=null){
                        p.start();
                        if(p.getVisualComponent()!=null){
                             panel.add(player.getVisualComponent());
                             panel.validate();
              if(ce instanceof ControllerErrorEvent){
                   p.removeControllerListener(this);
                   MyPlayList mpls=find(p);
                   if(mpls!=null){
                        // Close the player
                        // Remove the player helper class object from the list
                        p.close();
                        currentParticipant.removeElement(mpls);
                   System.out.println("Receiver internal error: "+ce);
         class SessionLabel{
              public String addr=null;
              public int port;
              public int ttl;
              SessionLabel(String session) throws IllegalArgumentException
                   int off;
                   String portStr=null;
                   String ttlStr=null;
                   if(session!=null && session.length() >0){
                        while(session.length()>1 && session.charAt(0)=='/')
                             session=session.substring(1);
                        off=session.indexOf('/');
                        if(off==-1){
                             if(!session.equals(""))
                                  addr=session;
                        }else{
                             addr=session.substring(0,off);
                             session=session.substring(off+1);
                             off=session.indexOf('/');
                             if(off==-1){
                                  if(!session.equals(""))
                                       portStr=session;
                             }else{
                                  portStr=session.substring(0,off);
                                  session=session.substring(off+1);
                                  off=session.indexOf('/');
                                  if(off==-1){
                                       if(!session.equals(""))
                                            ttlStr=session;
                                  }else{
                                       ttlStr=session.substring(0,off);
                   if(addr==null)
                        throw new IllegalArgumentException();
                   if(portStr!=null)
                        try{
                             Integer ints=Integer.valueOf(portStr);
                             if(ints!=null)
                                  port=ints.intValue();
                        }catch(Throwable t){
                             System.out.println(" --X PortStr Error..");
                             throw new IllegalArgumentException();
                   }else
                        throw new IllegalArgumentException();
                   if(ttlStr!=null){
                   try{
                        Integer intsttl=Integer.valueOf(ttlStr);
                        if(intsttl!=null)
                             ttl=intsttl.intValue();
                   }catch(Throwable t){
                             System.out.println(" --X PortStr Error..");
                             throw new IllegalArgumentException();
         class MyPlayList{
              Player clientPlay;
              ReceiveStream stream;
              MyPlayList(Player p,ReceiveStream rs){
                   clientPlay=p;
                   stream=rs;
              public void close()
                   clientPlay.close();

  • Text formatting in Numbers is not working correctly.

    In Numbers on Chrome text formatting is not working correctly, it's almost as if a CSS file is not being loaded. To be precise, when I try to make a cell Bold there is no bolding. I am using Arial as a font. This has been an issue on Mac and Windows. Any ideas?

    Do you have the same problem with Safari or Firefox?

  • Applet does not work after conversion

    Hi,
    A have an html page on with a use an applet. The applet is downloaded in two cab files for the internet explorer.
    The applet and the download works fine without the java plugin.
    When I convert this page to using the html converter the applet does not work
    The error is
    java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I think he fails on the downlad of the second cab file....
    Sombody any ideas,
    Thank
    Tom Van de Velde

    I recently moved to programming applets and this problem gave me many
    headaches. I know that the java compiler is supposed to compile with an
    appropriate version, but I suspect that there may be a few flaws in the
    system.
    Try compiling with a command like this to force a 1.1 compilation:
    "javac -target 1.1 yourfile.java"
    This enabled my applets to load in Netscape 4.6, something they wouldn't do before.
    Installing the java plugin seems to fix the problem on other browsers. This might
    be a new bug introduced by Java 1.4, since I had very few problems with
    Java 1.3...I dunno...that's speculation...

  • 1st Gen iPod touch not working correctly?

    I have a 1st generation 8GB iPod Touch. It's not working correctly.
    My biggest problem is that, unexplaiably, certain areas of the screen don't seem to register touch anymore. There is a sort of "L" shape on the left and bottom edges of the screen that won't register touch, making it impossible to move applications to the previous page on the home screen and making it hard to use the keyboard/buttons while in portrait mode. It's extremely frustrating to try to change the volume while playing a song, as I now have to either put the iPod in sleep mode then double tap the home button or flip it to cover flow and double tap the home button to do it.
    http://i38.photobucket.com/albums/e140/Vipershark/IMG_0001.png
    (Highlight the image to see it better.)
    This is a screenshot of the working/non-working areas that I made using the Whiteboard application. The white area that you see (excluding the little half circles of black which are extended brush strokes and not actually working areas) is the area that doesn't work. I can't seem to figure out why it happened, as I've never dropped or otherwise damaged it. It just happened one day, and I don't know why.
    But I can't fix it. I've tried everything. Upgrading (I'm now running iPhone OS 3.0 which still didn't fix the problem.) didn't work, restoring didn't work, deleting everything and restoring from factory settings didn't work.
    I'm also having a few other problems as well, though they're not as bad. My home button seems to stop working sometimes and sometimes the entire screen witll stop registering touch until I put the iPod to sleep and turn it back on. It also seems to go a lot slower than usual.
    My iPod is less than a year old. Can you help?

    Vipershark,
    I had a very similar problem this past weekend with my 1G 8GB iPod touch. But with me, just the left side of the screen wasn't registering my touch. I could still access the bottom section, which you cannot.
    The good news for me is that I fixed it and I hope it works for you as well. What fixed it for me was resetting all my settings. To do this, go to the settings icon, then click on general, and then on the very bottom is reset. Choose "reset all settings."
    Apparently this is different than a restore through iTunes, which you tried. I also tried that earlier and it did not help.
    Of course, the reset solution I used relies on you being able to access all of the correct buttons, so I hope you can!
    Please let us know if this works for you. If not, since it is less than a year old, it is still under warranty. Contact Apple and see what they can do.

  • Function keys are not working correctly

    I've been looking all over the various threads and I can't find an answer that solves my problem.
    Here are the details:
    I bought the computer in the U.S. where I live.
    I have a iMac 2.4GHz intel Core 2 Duo  EMC 2133 with a 20" screen. Bought it new in February 2008.
    I have Mac OS X 10.5.8  (I am waiting for my order for OS Snow Leopard to come in!!)
    I have been using a wireless mouse and Keyboard (Love not having cords!)
    Recently, my wireless keyboard got a short and quit working. I went down to the apple store and got a new wireless keyboard.
    I had the computer with me at the genius bar so, yes, the apple employee saw exactly what I have.
    I took it all home got the thing all put back together and got the new keyboard paired up and working with the computer.
    Here are the problems:
    Went to go use the function keys while using iTunes and found they weren't working properly. The F10, F11 and F12 do not control the volume of sound as the keyboard indicates they would, they instead activate dashboard, spaces, and application windows. 
    Following the advice of other threads, I looked over in the system preferences and made sure the "Use all F1, F2 etc." box was unchecked (it was unchecked), things still didn't work.
    I tried the fn key but it appears to not work at all it has no effect on the functioning of the function keys.
    I went under keyboard shortcuts in system preferences and found the F10, F11 and F12 keys, it confirms that those keys control spaces, dashboard and application windows as they are performing but shows no options to either reassign to volume control (as marked on the keyboard) or make the fn key work.
    I've gone back and forth trying various combinations of checked and unchecked boxes to see if anything would work, so far I've come up with nothing.
    A couple more important or interesting facts:
    Yes I have turned off and taken the batteries out of the old keyboard. My bluetooth connection currently shows it as disconnected.
    I have restarted the computer.
    One thing I find odd; when I go under preferences and go to Keyboard and Mouse when I go under the section "Bluetooth" it shows Bluetooth mouse with the name of the mouse and the battery level. BUT nothing is showing up under bluetooth Keyboard, I can't figure out how to change this and don't know if it is contributing to the problem.
    When I go under the bluetooth logo on the top bar I find the mouse and both keyboards referenced, the old keyboard is shown as disconnected and the other two are connected. I have tried to update the device's name but it doesn't seem to let me.
    I have double clicked on the device under bluetooth and it shows the new keyboard as discoverable, paired and connected. Hence, I am using the new keyboard to write this inquiry.
    Please, any assistance would be of great help. I have tried to be thorough in order help narrow the possible problem. Thanks!!

    Hendry
    Just thought I'd let you know.  Our suspicions were correct, it was the OS. After I installed Snow Leopard (10.6.8) all the problems were corrected.  I also updated the RAM from 1 gb to 6 gb. The mac is working all around better. Sorry it took so long to get back to everyone. My superdrive had pooped out. Rather than replace it I got an external drive from OWC connected with firewire 800.  So far everything is running very well, as far as I can tell this external drive is better than the original superdrive. My superdrive has always acted funny, infact I returned the first mac I got after a week because its superdrive was also malfunctioning. Anyway, all that to say everything seems to be fully functioning again.
    Roy
    Re: Function keys are not working correctly 

  • Applet is not working and I do not know why it is not working

    I cannot figure out why my applet is not working. Can someone assist me with this problem?
    Here is the code:
    As you will soon find out some of those imports can be ignored.
    import java.lang.Integer;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.awt.event.ItemListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.Graphics.*;
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.JApplet.*;
    import javax.swing.JFrame.*;
    import java.applet.Applet;
    import javax.swing.border.*;
    import javax.swing.Spring.*;
    import java.awt.geom.AffineTransform;
    import java.awt.Graphics2D;
    import java.beans.PropertyChangeListener;
    import java.beans.PropertyChangeEvent;
    import java.math.*;
    public class Test extends JApplet{
    JFormattedTextField Relfield;
    JFormattedTextField Relfield2;
    JFormattedTextField Relfield3;
    GridLayout layout = new GridLayout();
    public void init() {
    Double d = 0.0;
    Double e = 0.0;
    Relfield2 = new JFormattedTextField();
    Relfield3 = new JFormattedTextField();
    Relfield = new JFormattedTextField();
    Relfield.setText(d + "");
    Relfield2.setText(e + "");
    TextFieldHandler handlers = new TextFieldHandler();
    Relfield.addPropertyChangeListener(handlers);
    JButton button1 = new JButton("1");
    JButton button2 = new JButton("2");
    button1.addActionListener(new T5C());
    button2.addActionListener(new T6C());
    Container c = getContentPane();
    c.setLayout(layout);
    c.add(Relfield);
    c.add(Relfield2);
    c.add(button1);
    c.add(button2);
    class T5C implements ActionListener
    public void actionPerformed(ActionEvent e) {
    Double b = (Double)(Double.parseDouble(Relfield.getText())) + 1;
    Relfield.setValue(b + "");
    Relfield2.setValue(b + "");
    class T6C implements ActionListener
    public void actionPerformed(ActionEvent e) {
    Double b = (Double)(Double.parseDouble(Relfield.getText())) - 1;
    Relfield.setValue(b + "");
    Relfield2.setValue(b + "");
    public class TextFieldHandler implements PropertyChangeListener {
    public void propertyChange(PropertyChangeEvent e) {
    Object source = e.getSource();
    if (source == Relfield) {
    Double Rel = ((Double)Relfield.getValue()).doubleValue();
    Relfield.setValue(Rel);
    Relfield2.setValue(Rel);
    //BigDecimal myu = new BigDecimal("Relfield.getValue()");
    public static void main( String[] argv ) {
            JFrame frame = new JFrame( "General Shear Mode Damper Design" );
            frame.addWindowListener( new WindowAdapter(){
                public void windowClosing( WindowEvent e ){
                    System.exit( 0 );
            JApplet applet = new Test();
            frame.getContentPane().add(applet);
            applet.init();
            frame.setSize( 1020, 720);
            frame.setVisible(true);
    }

    The applet is not running at all and I can't figure out the error messages.
    The error messages are below:
    C:\Users\zite.1\Desktop>javac Test.java
    C:\Users\zite.1\Desktop>java Test
    Exception in thread "main" java.lang.NullPointerException
    at Test$TextFieldHandler.propertyChange(Test.java:89)
    at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
    at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
    at java.awt.Component.firePropertyChange(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at javax.swing.JRootPane.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Panel.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at javax.swing.JComponent.addNotify(Unknown Source)
    at javax.swing.JRootPane.addNotify(Unknown Source)
    at java.awt.Container.addNotify(Unknown Source)
    at java.awt.Window.addNotify(Unknown Source)
    at java.awt.Frame.addNotify(Unknown Source)
    at java.awt.Window.show(Unknown Source)
    at java.awt.Component.show(Unknown Source)
    at java.awt.Component.setVisible(Unknown Source)
    at java.awt.Window.setVisible(Unknown Source)
    at Test.main(Test.java:112)

Maybe you are looking for