Help need in Applets.....Urgent

Hi,
I am stuck with a problem. Please help me out.
The requirement is :
I have an applet which has to run an executable which produces a .txt. The applet should use this .txt to produce its output.
I made the applet into a signed jar and ran the executable to produce the .txt . But the .txt is outside the jar file and I am not able to use it to create the result.
How do I use the .txt now?? Is the method that I am trying proper or should I use some other method?
Another doubt is, when I run the .html of the applet code (which is in the server), is it cached in the client???

Cross post:
http://forum.java.sun.com/thread.jspa?threadID=790801&messageID=4494066#4494066

Similar Messages

  • Help need to script(urgent)

    hai everybody...
    i ahve written a javascript for popup a new
    window...this is my script
    script
    function open()
    if(portal40.wwctx_api.get_user=='JAYANTHAN')
    window.open('http://suntechchn:7777/pls/portal40/ATCMIS.ENQUIRY_REP.show?p_arg_names=_show_header&p_arg_values=YES&p_arg_names=_max_rows&p_arg_values=25&p_arg_names=_portal_max_row s&p_arg_values=25','new_page','width=1500,height=550,scrollbars=yes');
    else
    window.open('http://suntechchn:7777/pls/portal40/ATCMIS.ENQ_REPORT.show?p_arg_names=_show_header&p_arg_values=YES&p_arg_names=_max_rows&p_arg_values=25&p_arg_names=_portal_max_rows &p_arg_values=25','new_page','width=1000,height=950,scrollbars=yes');
    open();
    but it doesn't open the new window...
    for this i have created two reports,the above links are the report links...if it satisfy the condition then the first link lead to the
    first report if not then second report
    please help need ....
    thansk in advance
    leena
    null

    This example will read and put the Authors name to the ESTK console and write the new details back to the document.
    #target bridge
    loadXMPLibrary();
    var thumb = app.document.selections[0];
    if(thumb.hasMetadata){
            var selectedFile = thumb.spec;
      var myXmpFile = new XMPFile( selectedFile.fsName, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_UPDATE);
      var myXmp = myXmpFile.getXMP();   
      var arrItem='';
      var items = myXmp.countArrayItems(XMPConst.NS_DC, "creator");
       for(var i = 1;i <= items;i++){
    arrItem += myXmp.getArrayItem(XMPConst.NS_DC,  "creator", i);          
        $.writeln(arrItem);
    var Author = "This is my new Author";
    myXmp.deleteProperty(XMPConst.NS_DC, "creator");
    myXmp.appendArrayItem(XMPConst.NS_DC, "creator", Author, 0,XMPConst.ARRAY_IS_ORDERED);
    if (myXmpFile.canPutXMP(myXmp)) {
        myXmpFile.putXMP(myXmp);
             myXmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
    unloadXMPLibrary();
    function loadXMPLib(){
    if (ExternalObject.AdobeXMPScript == undefined) {
        ExternalObject.AdobeXMPScript = new ExternalObject("lib:AdobeXMPScript");
    function unloadXMPLib(){
       if( ExternalObject.AdobeXMPScript ) {
          try{
             ExternalObject.AdobeXMPScript.unload();
             ExternalObject.AdobeXMPScript = undefined;
          }catch (e){ }

  • Help Needed on report Urgent

    Hi Experts
    my requirement is to combine the standard selection screens of T-CODE IW39 & IW59 as a one selection screen.
    i tried  a lot but i'm unable to do it.
    in these selection screens some blocks are called by dynamically through ldb. if i copied standard prog of T-CODE IW39 as zprogram it dispalying the whole selection screen but at that time i'm unable to merge IW59 selection screen code with this caode.
    can any help me urgent .plz

    hi
    chk this out
    SELECTION-SCREEN: Special Variant for Logical Databases
    You may only use these variants in the INCLUDE program DBldbSEL of logical database ldb.
    Variants:
    1.SELECTION-SCREEN BEGIN OF VERSION vers TEXT-xxx.
    2. SELECTION-SCREEN END OF VERSION vers.
    3. SELECTION-SCREEN EXCLUDE ... .
    4.SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab.
    5.SELECTION-SCREEN FIELD SELECTION FOR TABLE dbtab.
    6.SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE node.
    7.SELECTION-SCREEN FIELD SELECTION FOR NODE node.
    Variant 1
    SELECTION-SCREEN BEGIN OF VERSION vers TEXT-xxx.
    Variant 2
    SELECTION-SCREEN END OF VERSION vers.
    Variant 3
    SELECTION-SCREEN EXCLUDE ... .
    Effect
    Defines a selection screen version (three character name vers). Between BEGIN OF VERSION and END OF VERSION , you can exclude selection screen objects from version vers using SELECTION-SCREEN EXCLUDE. This allows you to reduce the database-specific part of the standard selection screen to those objects relevant to the report in question without having to sacrifice important selection criteria in other reports.
    You activate a selection screen version for a report by entering it in the report attributes. If the database access program SAPDBldb itself has a selection screen version in its attributes, this applies to all reports that use the logical database and for which you have not declared a particular selection screen variant.
    The function of the text symbol TEXT-xxx is to enable users to choose a selection screen variant using F4 help on the program attributes screen.
    Extras:
    (for SELECTION-SCREEN EXCLUDE) 1. ... PARAMETERS par 2. ... SELECT-OPTIONS sel
    3. ... RADIOBUTTON GROUPS radi
    4. ... BLOCKS block
    5. ... IDS id
    Effect
    Excludes selection screen objects between SELECTION-SCREEN BEGIN and END OF VERSION. You can also exclude individual parameters, select-options, and radiobutton groups, within SELECTION-SCREEN BEGIN/END OF BLOCK blocks, and other SELECTION-SCREEN objects such as comments and underlines using the ID id addition.
    Notes
    You can only exclude objects of the DS:ABEN.SELECTION_SCREEN>standard selection screen 1000, not any that belong to a screen defined using SELECTION-SCREEN BEGIN OF SCREEN ... AS SUBSCREEN. If the standard selection screen includes objects from other screens ( SELECTION-SCREEN INCLUDE ... ID ...), you can use SELECTOIN-SCREEN EXCLUDE IDS ... to exclude them from the screen.
    The database program SAPDBldb can use the function module RS_SELSCREEN_VERSION to use the active version of the selection screen for the current report.
    Example
    TABLES SPFLI.
    NODES CHARLY.                  " with structure SFLIGHT
    PARAMETERS PAR_1 LIKE SPFLI-CARRID FOR TABLE SPFLI.
    SELECT-OPTIONS SEL_1 FOR SPFLI-CONNID.
    SELECT-OPTIONS SEL_2 FOR CHARLY-FLDATE.
    SELECT-OPTIONS SEL_3 FOR SPFLI-CITYFROM.
    SELECTION-SCREEN COMMENT /10(20) TEXT-100 FOR TABLE SFLIGHT ID 001.
    SELECTION-SCREEN COMMENT /8(30) TEXT-200 FOR NODE CHARLY ID 002.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN NO INTERVALS.
      SELECTION-SCREEN BEGIN OF BLOCK B100 WITH FRAME TITLE TEXT_001.
        PARAMETERS P100_1 TYPE SFLIGHT-SEATSMAX FOR NODE CHARLY.
      SELECTION-SCREEN END OF BLOCK B100.
    SELECTION-SCREEN END OF SCREEN 100.
    PARAMETERS PAR_2 LIKE SY-SUBRC FOR TABLE SFLIGHT.
    PARAMETERS PAR_3 LIKE CHARLY-PLANETYPE FOR NODE CHARLY.
    SELECTION-SCREEN BEGIN OF VERSION ABC TEXT-008.
      SELECTION-SCREEN EXCLUDE PARAMETERS: PAR_1, PAR_3.
      SELECTION-SCREEN EXCLUDE SELECT-OPTIONS SEL_2.
      SELECTION-SCREEN EXCLUDE IDS 001.
    SELECTION-SCREEN END   OF VERSION ABC.
    SELECTION-SCREEN BEGIN OF VERSION XYZ TEXT-XYZ.
      SELECTION-SCREEN EXCLUDE IDS 100.
    SELECTION-SCREEN END OF VERSION XYZ.
    If the report attributes (or the attributes of database program SAPDBldb) contain the selection screen version ABC, the parameters PAR_1 and PAR_3, the select-option SEL_2 and the comment with text number 100 (ID 001) do not appear on the selection screen. Text symbol 008 of SAPDBldb is displayed if you choose F4 help for the 'Selection screen version' field.
    If the program attributes (or the attributes of the database program SAPDBldb) contain the selection screen version XYZ, the block B100 containing the parameter P100_1 does not appear on the standard selection screen 1000, but it does appear on the subscreen 100..
    Variant 4
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE dbtab.
    Variant 6
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE
    node.
    Extras:
    ... ID id
    Effect
    This statement returns the tables or nodes of the logical database for which additional selections are supported. If one of these tables or nodes is active in the report (declared using TABLES or NODES, or in the path from the database hierarchy root to a table declared using TABLES or NODES), the 'Free selections' pushbutton appears on the selection screen. If the user chooses this function, the system branches to a dialog in which the user can enter selections for the relevant fields of the appropriate tables. There are two ways to set the fields for which users can make free selections:
    Using a selection view created for that purpose:
    You maintain selection views within logical database maintenance. They consist of a set of fields from tables in the logical database that are divided into groups. You can also preselect fields here. Customers may overlay the selection view (that is, the system searches first for a customer-specific selection view. Only if one does not exist will the system display the SAP selection view).
    If you have already made a preselection in the selection view, the user sees the selection screen for the preselected fields on which to enter his or her selections. If no fields have been preselected, the user must first select some.
    Using all fields of all tables
    In this case, the user must choose the table and then the fields for which he or she wants to define additional selections. Having selected these, he or she then passes to the selection screen for entering the free selections.
    The database access program SAPDBldb takes on the form of a complex data object DYN_SEL consisting of WHERE clauses generated by the user input for dynamic database access.
    Note
    You cannot use free selections for nodes with type C (complex data objects).
    Note
    The precise definition of the object DYN_SEL is stored in TYPE-POOL RSDS and reads:
    TYPES: BEGIN OF RSDS_WHERE,
             TABLENAME LIKE RSDSTABS-PRIM_TAB,
             WHERE_TAB LIKE RSDSWHERE OCCURS 5,
           END OF RSDS_WHERE.
    TYPES: BEGIN OF RSDS_TYPE,
             CLAUSES TYPE RSDS_WHERE OCCURS 5,
             TEXPR   TYPE RSDS_TEXPR,
             TRANGE  TYPE RSDS_TRANGE,
           END   OF RSDS_TYPE.
    DATA DYN_SEL TYPE RSDS_TYPE.
    The object DYN_SEL contains (amongst other elements) a component (CLAUSES), which is an internal table. Each line in the internal table contains a table name (TABLENAME) and a further internal table (WHERE_TAB), that contains the WHERE clauses for table (TABLENAME).
    The structure of the two other components is contained in type pool RSDS.
    TEXPR contains the selections in a storeable format that you can use for the 'freely callable' function modules used to enter free selections ( FREE_SELECTIONS_INIT, FREE_SELECTIONS_DIALOG). TRANGE contains the selections in the form of RANGES tables , that you can use with the IN operator in the SELECT, CHECK and IF statements.
    Note
    Neither the TYPE-POOL RSDS nor the declaration of DYN_SEL need to be written into the database program: both are automatically included by the system.
    In the database program SAPDBldb, an access to a table XXXX might look like this:
    FORM PUT_XXXX.
      DATA L_DS_CLAUSES TYPE RSDS_WHERE.
      MOVE 'XXXX' TO L_DS_CLAUSES-TABLENAME.
      READ TABLE DYN_SEL-CLAUSES WITH KEY L_DS_CLAUSES-TABLENAME
                                 INTO L_DS_CLAUSES.
      SELECT * FROM XXXX
               WHERE field1 IN ...
               AND   field2 ....
               AND (L_DS_CLAUSES-WHERE_TAB).
          PUT XXXX.
      ENDSELECT.
    ENDFORM.
    Note
    If the table L_DS_CLAUSES-WHERE_TAB is empty (in other words, there are no free selections for table XXXX), the system ignores the addition ... AND (L_DS_CLAUSES-WHERE_TAB) in the SELECT statement.
    Variant 5
    SELECTION-SCREEN FIELD SELECTION FOR TABLE dbtab.
    Variant 7
    SELECTION-SCREEN FIELD SELECTION FOR NODE node.
    Extras:
    ... ID id
    Effect
    This statement returns the tables and nodes of the logical database for which field selections are supported.
    If required by the report, not all fields of these tables and nodes are filled from the database, but only those that the report needs. You declare these fields in the report using GET dbtab FIELDS f1 ... fn or GET dbtab LATE FIELDS f1 ... fn (the field list is then completed by the system, using the key fields of table dbtab).
    You can improve performance considerably by restricting the fields used to those that are really necessary.
    The database access program SAPDBldb receives the fields for the dynamic field selection in the form of an internal table SELECT_FIELDS.
    Note
    You cannot use this addition for nodes with type C (complex data objects).
    Note
    The exact definition of the object SELECT_FIELDS is stored in TYPE-POOL RSFS and reads:
    TYPES: BEGIN OF RSFS_TAB_FIELDS,
             TABLENAME LIKE RSDSTABS-PRIM_TAB,
             FIELDS LIKE RSFS_STRUC OCCURS 10,
           END OF RSFS_TAB_FIELDS.
    TYPES: RSFS_FIELDS TYPE RSFS_TAB_FIELDS OCCURS 10.
    DATA SELECT_FIELDS TYPE RSFS_FIELDS.
    SELECT_FIELDS is an internal table. Each line of the internal table contains a table name (TABLENAME) and a further internal table (FIELDS) containing the fields of table (TABLENAME).
    Note
    You do not need to declare the TYPE-POOL RSFS or SELECT_FIELDS in the database program, since both are included automatically by the system. Unlike the objects linked using the DYNAMIC SELECTIONS addition, SELECT_FIELDS is also available in the report.
    In the database program SAPDBldb, an access to table XXXX might look like this:
    FORM PUT_XXXX.
      DATA L_TAB_FIELDS TYPE RSFS_TAB_FIELDS.
      MOVE 'XXXX' TO L_TAB_FIELDS-TABLENAME.
      READ TABLE SELECT_FIELDS WITH KEY L_TAB_FIELDS-TABLENAME
                               INTO L_TAB_FIELDS.
      SELECT (L_TAB_FIELDS-FIELDS)
                 INTO CORRESPONDING FIELDS OF XXXX
                 FROM XXXX
             WHERE field1 IN ...
             AND   field2 ....
          PUT XXXX.
      ENDSELECT.
    ENDFORM.
    Notes
    If table L_TAB_FIELDS is empty (in other words, the report for table XXXX does not require any field selection), SELECT (L_TAB_FIELDS) ... behaves like SELECT * ..., that is, all fields of table XXXX are filled.
    The internal table SELECT_FIELDS is filled when the INIT routine runs in the database program or when the INITIALIZATION runs in the report. The program can access it if the logical database requires extra fields.

  • Srw.run_report problem. Help needed...Urgent

    Hi,
    I am very new to Oracle Reports. I need some help in using the srw.run_report
    I am having two reports. Rep_A and Rep_B
    I will always invoke the Rep_A first...Rep_B should always be invoked in Rep_A
    In Rep_A, i need to check a parameter P_Param1 and based upon the value i need to proceed as follows
    If P_Param1 = 1 then
    --Rep_A should be generated and returned as stream(cache)
    --Rep_B shouldnt be invoked
    If P_Param1 = 2 then
    --Rep_B should be generated and returned as stream.
    --Rep_A should not be generated
    If P_Param1 = 3 then
    --Rep_A and Rep_B should be generated and returned as stream
    --(Rep_A followed by Rep_B)
    If P_Param1 = 4 then
    --Rep_A and Rep_B should be generated and saved as files in a specified location.(this location is in another machine)
    This is my requirement. I hope I am clear with my requirement.
    How can we achieve these.
    Are there any technical issues?
    Please guide me
    thanks...
    siva

    Hi all,
    just to keep this thread active.
    can anyone help me in using srw.run_report.
    its an urgent requirement.
    thanks...
    siva

  • HELP NEEDED for applet posting

    Hi,
    I have a PC with J2SDK1_4_0_01.
    I wanted to publish my first "Hello World" applet on both Netscape 6.2 and IE 6.0. In Netscape it works but on IE it does not. The html and class file are in the same directory. In the Java console I get the following error:
    java.lang.NoClassDefFoundError
    java.lang.ClassNotFoundException: HelloWorld
    I tried using the OBJECT tag under IE and there is no change. Could you please help and tell me what I'm doing wrong? Thanks in advance!
    -- Cristian

    Hi,
    I fixed it. I'm putting it here because it could be of use to some one. So, I had jre 1.3.1 with IE 6.0 and Netscape 6.2 on Windows 2000 Pro and the "applet" tag would not work in neither of them despite the fact that the .html and .class files were in the same directory and the VM from the browsers should have kicked in (could anyone explain it?). Then I uninstalled jre 1.3.1 and downloaded jre 1.4.0. At this moment the "applet" tag worked in NETSCAPE (loaded and showed the applet) and in IE would still not work despite having the plug-in setup for both browsers at installation time.
    I decided to try the "object" tag in IE with "codebase" targeted to Sun's location of the 1.4.0 plug-in. To my surprise it would not recognise that it is already installed and would ask for it from SUN. After the download and in the middle of the installation would stop and pop-up a window saying "You already have plug-in 1.4.0 - Do you want to uninstall it?".
    So I uninstalled the previous copy and let the automatic download and installation take place. And, after this second installation through the OBJECT tag it works both for Netscape and IE, and with all tags: applet, object and embed!
    Now may I ask you why do we need this very complex technology to achieve such a simple task?
    -- Cristian

  • Newbie help needed with Applet

    I am having a problem with the following Applet. I have highlighted it in bold.
    How can I ensure that all of the conditions are met regardless of the order they are inserted on the graph,within the program?
    At the moment I have to do them in the exact order they are in the code in order to get the "Winner" message.
    Also if I insert an image at any time at the point if(x >= 290 && x <= 350 && y >= 290 && y <= 350) I also receive the "Winner" message. I realise this happens because it is the last line of code in this statement.
    However I am very new to this and dont know how to fix it. Indeed I dont even know if this is the correct way to do this.
    Hope this makes sense.
    Any help would be very much appreciated
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class MyDraughts extends Applet implements MouseListener,ActionListener,
                   MouseMotionListener{
                        public MyDraughts(){
                             points = new ArrayList();
                             pawncount = 0;
                             pawncount1 = 14;
                             message = "";
                             message1 = "";
                             title = new Font ("Arial", Font.BOLD, 18);
         private Point square1, square2, square3, square4, square5, square6, square7,square8,square9,
         square10,square11,square12,square13,square14,square15,square16,square17,square18,square19,
         square20,square21,square22,square23,square24,square25,square26,square27,square28,square29,
         square30,square31,square32,mouse;
         private int select;
         private Image pawn;
         private Point icon;
         private ArrayList points;
         private int x;
         private int y;
         private int pawncount;
         private int pawncount1,pawncount2;
         private Button undoButton;
         private String message,message1;
         private Font title;
         public void init(){
              setBackground(new Color(210,255,210));
              this.addMouseMotionListener(this);
              this.addMouseListener(this);
              select = 0;
              square1=new Point(50,10);
              square2=new Point(130,10);
              square3=new Point(210,10);
              square4=new Point(290,10);
              square5=new Point(10,50);
              square6=new Point(90,50);
              square7=new Point(170,50);
              square8=new Point(250,50);
              square9=new Point(50,90);
              square10=new Point(130,90);
              square11=new Point(210,90);
              square12=new Point(290,90);
              square13=new Point(10,130);
              square14=new Point(90,130);
              square15=new Point(170,130);
              square16=new Point(250,130);
              square17=new Point(50,170);
              square18=new Point(130,170);
              square19=new Point(210,170);
              square20=new Point(290,170);
              square21=new Point(10,210);
              square22=new Point(90,210);
              square23=new Point(170,210);
              square24=new Point(250,210);
              square25=new Point(50,250);
              square26=new Point(130,250);
              square27=new Point(210,250);
              square28=new Point(290,250);
              square29=new Point(10,290);
              square30=new Point(90,290);
              square31=new Point(170,290);
              square32=new Point(250,290);
              undoButton = new Button("Undo");
    add(undoButton);
    undoButton.addActionListener(this);
              mouse= new Point();
              icon = new Point();
              pawn = getImage(getCodeBase(), "pawn.gif");
    public void actionPerformed(ActionEvent actionevent){
    if(actionevent.getSource() == undoButton){
    int a = points.size();
    int b = a - 1;
    points.remove(b);
    a = points.size();
    repaint();
    public void paint (Graphics g){
         drawBox(g);
         g.fillRect(square1.x, square1.y,40,40);
         g.fillRect(square2.x, square2.y,40,40);
         g.fillRect(square3.x, square3.y,40,40);
         g.fillRect(square4.x, square4.y,40,40);
         g.fillRect(square5.x, square5.y,40,40);
         g.fillRect(square6.x, square6.y,40,40);
         g.fillRect(square7.x, square7.y,40,40);
         g.fillRect(square8.x, square8.y,40,40);
         g.fillRect(square9.x, square9.y,40,40);
         g.fillRect(square10.x, square10.y,40,40);
         g.fillRect(square11.x, square11.y,40,40);
         g.fillRect(square12.x, square12.y,40,40);
         g.fillRect(square13.x, square13.y,40,40);
         g.fillRect(square14.x, square14.y,40,40);
         g.fillRect(square15.x, square15.y,40,40);
         g.fillRect(square16.x, square16.y,40,40);
         g.fillRect(square17.x, square17.y,40,40);
         g.fillRect(square18.x, square18.y,40,40);
         g.fillRect(square19.x, square19.y,40,40);
         g.fillRect(square20.x, square20.y,40,40);
         g.fillRect(square21.x, square21.y,40,40);
         g.fillRect(square22.x, square22.y,40,40);
         g.fillRect(square23.x, square23.y,40,40);
         g.fillRect(square24.x, square24.y,40,40);
         g.fillRect(square25.x, square25.y,40,40);
         g.fillRect(square26.x, square26.y,40,40);
         g.fillRect(square27.x, square27.y,40,40);
         g.fillRect(square28.x, square28.y,40,40);
         g.fillRect(square29.x, square29.y,40,40);
         g.fillRect(square30.x, square30.y,40,40);
         g.fillRect(square31.x, square31.y,40,40);
         g.fillRect(square32.x, square32.y,40,40);
         g.setFont(title);
         g.drawString(message, 350, 300);
         g.drawString(message1, 350, 320);
         for(int i = 0; i < points.size(); i++){
    icon = (Point)points.get(i);
    g.drawImage(pawn, icon.x, icon.y, 25, 25, this);
         g.drawImage(pawn,175,135,25,25,this);
         g.drawImage(pawn,135,175,25,25,this);
         g.setFont(title);
         g.drawString("Click A Square To Place A Pawn", 350, 50);
    public void mouseDragged(MouseEvent e){}
    public void mouseMoved(MouseEvent e){}
    //require for the interface
    public void mousePressed(MouseEvent mouseevent){
    setBackground(new Color(210,255,210));
    x = mouseevent.getX();
    y = mouseevent.getY();
    if(x > 19 && x < 312 && y > 19 && y < 312){
    pawncount = pawncount + 1;
    points.add(mouseevent.getPoint());
    if(pawncount > pawncount1){
    setBackground(Color.red);
    message = "Too Many Pawns!You can only place 14";
    message1 = "Hit restart to play again";
    pawncount1 = 14;
    if(x >= 10 && x <= 50 && y >= 290 && y <= 330){
    setBackground(Color.red);
    message = "A Pawn Can't be placed here";
    pawncount = 15;
    if(x >= 50 && x <= 90 && y >= 250 && y <= 290){
    setBackground(Color.red);
    message = "A Pawn Can't be placed here";
    pawncount = 15;
    if(x >= 90 && x <= 130 && y >= 210 && y <= 250){
    setBackground(Color.red);
    message = "A Pawn Can't be placed here";
    pawncount = 15;
    //This is the solution for the puzzle
    if(x >= 90 && x <= 130 && y >= 10 && y <= 50);
    if(x >= 250 && x <= 290 && y >= 10 && y <= 50);
    if(x >= 90 && x <= 130 && y >= 50 && y <= 90);
    if(x >= 170 && x <= 210 && y >= 50 && y <= 90);
    if(x >= 10 && x <= 50 && y >= 90 && y <= 130);
    if(x >= 50 && x <= 90 && y >= 90 && y <= 130);
    if(x >= 250 && x <= 290 && y >= 130 && y <= 170);
    if(x >= 50 && x <= 90 && y >= 170 && y <= 210);
    if(x >= 210 && x <= 250 && y >= 210 && y <= 250);
    if(x >= 290 && x <= 350 && y >= 210 && y <= 250);
    if(x >= 10 && x <= 50 && y >= 250 && y <= 290);
    if(x >= 130 && x <= 170 && y >= 250 && y <= 290);
    if(x >= 210 && x <= 250 && y >= 290 && y <= 350);
    if(x >= 290 && x <= 350 && y >= 290 && y <= 350){
    setBackground(Color.green);
    message = "Winner";
    pawncount = 14;
    repaint();
    //required for the interface
    public void mouseClicked(MouseEvent event){}
    public void mouseReleased(MouseEvent event){}
    public void mouseEntered(MouseEvent event){}
    public void mouseExited(MouseEvent event){}
    public void drawBox(Graphics g){
         for(int i=10;i<=350;i+=40){
    g.drawLine(i,10,i,330);
    g.drawLine(10,i,330,i);
    }

    Since your code is heavilly dependant on which square is clicked on I'd define a class extending JComponent to represent a square. You can make this an inner class, which would simplify access to other squares etc. Then lay these out in your JPanel, and each will have it's own paint method which will paint it with or without a pawn.
    At the same time you add all these as a two dimensional array for logical access. Each square has (or is) it's own mouseListener so that you can let awt figure out which you clicked on.
    private static final int CELL_SIZE=50;
    private static final int BOARD_SIZE= 8;
    private class Square extends JComponent implements MouseListener {
        public boolean hasPawn;
        private Square(int row, int col) {
             Rectangle where = new Rectangle(col * CELL_SIZE, row * CELL_SIZE,
    CELL_SIZE, CELL_SIZE);
            setBounds(where);
           addMousListener(this);
       public void addPawn() {
         if(!hasPawn) {
           hasPawn = true;
           repaint();
      public void paint(Graphics g) {
    } // end of inner class
    Square[][]board = new Square[BOARD_SIZE][BOARD_SIZE];}

  • Help Needed Regarding Messaging URGENT

    hello everyone, i am new to this discussion ...can any one help me? i want a nokia handset with the message memory of 20 thousand sms.... because i recieve lots of messages and i dont want to delete them.. kindly help me out...
    thanks
    regards
    UNIMAN

    Keeping so many messages is going to cause a phone to be very slow and potentially unstable whilst using the messaging app.
    The only nokia's that have a chance of doing it are recent smartphones like the N82, N95, N78, N79, N85, N96, E51, E63, E66, E71 & E90. You will need to set the phone to store the messages on a memory card, not the phone memory.
    The only limitation I can see is that you are limited to 999 for the number of sent messages that you can keep. Received is unlimited if you have a lot of free space from what i've seen.
    The most sensible option would be to transfer your messages to a PC for permanent storage & archiving.

  • Help Needed !! Urgent. Read .txt using j2me.

    Hi,
    I need to read this field;
    Server IP Address = 192.122.139.16*
    BT Addr & Port No. = 000B0D182EDA:1*
    Help IP Address = 192.168.0.100:3334*
    is there any easy coding which can help me to read all the fields above using j2me?
    I am using BufferedReader and i am having abit of a problem..

    here's my coding.
    import java.io.*;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.midlet.MIDlet;
    public class Settings {
         public Settings()
              BufferedReader br = new BufferedReader(new FileReader("Settings.txt"));
              int a = 2000;
              String [] sets = new String [a];
              for (int i = 0; i < 2; i ++)
                        sets[i] = br.readLine();
                        System.out.println ("" +sets);
    the errors come from the BufferedReader. " BufferedReader cannot be resolved to a type".
    Do help me out with this.. thanks!
    Edited by: remi17 on Feb 18, 2008 8:02 PM

  • Help needed regarding applets

    hi all,
    i wans to write to a file which is in remote server using applet i m using secured applets.plz sujjest me

    What do you mean "write to a file"?
    Generally, the answer to a question like this is "write some server-side functionality that takes client input and handles it appropriately", but that's not always the answer.

  • Transfer Routine Help Needed!! Urgent!!

    Helllo Gurus,
                  I am running a report on Infoset and some of the fields has no data. when I report executed, the fields with no data shows "Not assigned" in the report. If I manually enter "Blank" space in the master data, it is displaying "Empty Space" in the report. But we are loading Master data everyday using process chains. How can I write in transfer rules that if one field is empty then it shud pass "Blank" for that field.
    How can achieve this????
    Any Help is appreciated with points.
    Regards,
    PNK.

    Hi Sam, Thanks for quick reply and your solution worked perfectly fine. I showed the solution to my manager, he is happy as of now. if the same solution is work in Quality and Production, do I have to transport this infoobjects to Quality and Prod or do I have to manually enter "Blank" space for the first record?????
    and during the refresh, we delete all the records from the master data and we reload. during this, do we have to do that again???
    Regards,
    PNK

  • ORA-12547 TNS:lost contact......Help need VERY VERY URGENTLY

    Hi
    We are using Oracle 8.1.6 under HP Unix 11i.
    When we execute the svrmgr command in HP-UX, it give us the followings error.
    $SVRMGR
    Oracle Server Manager Release 3.1.6.0.0 - Production
    Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
    ORA-12547: TNS:lost contact
    SVRMGR>
    If anyone knows how to solve it, please help us . Now we are not able to start and shutdown the database.
    regards
    Santhosh

    Santhosh,
    Is this a new install on this server or has it been working and only now having this issue? I had this same problem on HPUX 11 if the ORACLE_SID wasn't exported in the environment before starting svrmgrl. What happens when you try to connect? Did you try using sqlplus and connecting as sysdba?
    Regards.
    Robert.
    Hi
    We are using Oracle 8.1.6 under HP Unix 11i.
    When we execute the svrmgr command in HP-UX, it give us the followings error.
    $SVRMGR
    Oracle Server Manager Release 3.1.6.0.0 - Production
    Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.
    ORA-12547: TNS:lost contact
    SVRMGR>
    If anyone knows how to solve it, please help us . Now we are not able to start and shutdown the database.
    regards
    Santhosh

  • Help neede very very urgently ... to clear the report from Cache.....

    Hello all,,,
    In my project iam using crystsal report for eclipse to generate reports.
    Iam using a .jsp page to call my report.(which i got it from the examples of CRE).
    The name of my jsp page is poi.jsp
    The name of my Crystal report is CrystalReport2.rpt
    My problem is this....
    when i run the report first time i can see my poi.jsp page and user can submit
    the parameter and based on the users parameter the report is generated..(ITs working absoultely fine)
    but when the user runs the report again, its not showing the parameter page (i.e user cannot see poi.jsp)
    rather its showing the old generated report.
    When i tried using session.invalidate and session.removeAttribute it was showing me the poi.jsp page
    but the problem is when the user clicks on the print icon or any icon on the report its just
    showing the poi.jsp page...
    When the user closes the report or when the clicks on the button to generate the report it should
    show the parameter page (poi.jsp).how can i solve this problem???
    the code what iam using is as follows..( got it from the examples of CRE - database login )
    Object reportSource = session.getAttribute("reportSource");
    if (reportSource == null)
    String report = "CrystalReport2.rpt";
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open(report, 0);
    reportSource = reportClientDoc.getReportSource();
    session.setAttribute("reportSource", reportSource);
    ConnectionInfos connInfos = new ConnectionInfos();
    IConnectionInfo connInfo1 = new ConnectionInfo();
    connInfo1.setUserName("USER");
    connInfo1.setPassword("USER");
    connInfos.add(connInfo1);
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.setEnableLogonPrompt(false);
    viewer.setDatabaseLogonInfos(connInfos);
    if (session.getAttribute("refreshed") == null)
    viewer.refresh();
    session.setAttribute("refreshed", "true");
    viewer.setOwnPage(true);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
    //session.removeAttribute("refreshed");
    //session.invalidate();
    thanks in advance
    regards
    jack

    As far as parameter refresh is concerned add in your code
    viewer.setHasRefreshButton(true)
    refresh button is appeared on crystal report toolbar and you can use this button instead of explorer refrsh button and every time you can add new parameters values.
    Also, if you want to update reportsource in session object. means if user wants to view more than one different reports and want to invalidate reportsource form session.
    add in jsp.
    session.removeAttribute("reportSource");
    Happy programming
    Uzma

  • URGENT HELP NEEDED ... Tomcat Realm and JRE1.4 plug-in problem

    I have tried the Security Realm of Tomcat. Since I do not have
    an LDAP server, I decided to use the Tomcat-users.xml file in
    Tomcat\conf directory.
    I added the following lines of code in the web.xml file.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Entire Application</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <!-- NOTE: This role is not present in the default users file -->
    <role-name>webviewer</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Tomcat Manager Application</realm-name>
    </login-config>
    The <role-name> "webviewer" is added into "Tomcat-Users.xml" as the following:
    <tomcat-users>
    <user name="test" password="password" roles="webviewer" />
    </tomcat-users>
    So, now when we type the url: http://localhost:8080/adbpdbre/default.htm, TOMCAT shows a dialog box asking for UserName: and Password:Now, only when we give the username and password, it shows the page. This is exactly what we want.
    But the problem now is, this default.htm page, has 5 links to 5 applets. The first time that I click on one of these links, the JRE plug of 1.4 shows a dialog again asking for the username and password. Till I dont provide the username and password the system doesnt go ahead and applet doesnt load. I do not want the JRE to ask me for the username/passwords again..How to avoid this ?
    Can you give me some more information on this. Ultimately in the production usage, we will be using LDAP and not Tomcat's memory realm.
    URGENT HELP NEEDED ... I need to get back to my client on this.
    Help would be v. much appreciated.

    In the config file, you 're essentially saying that you want Tomcat to prompt for usr/passw on every request (url-pattern = /*) made by a 'webviewer', and that's exactly what Tomcat is doing.
    Consider using specific url-patterns & roles for resources to be protected. If for now, all you need is to protect the first page, use a more specific url-pattern.
    Just an advice : if you'll be using LDAP in production, do not waste time with Tomcat's Security Realm and the BASIC authentication type, since the two have not much in common. Start reading doc on LDAP, and code a prototype, or even better, a vertical slice of the app (i.e a proof of concept).

  • Urgent help needed on deployment facts

    Hi
    I had completed a Java Web based application using JApplet, which in turn uses Java Media Framework and Java Communications APIs. So when i deploy this application and let the clients use this application. I need to dump some jar files and properties files into the clients JRE so that all the APIs will work properly. Without any installations. I tried doing this manually by copying these files into client machines So is there a direct method for performing the task. Or i need to add some additional code to my applet so as to find the clients current JRE version and place the required files under using FTP? Can i write a setup routine or something which does all these operations once the client access the applet?
    Help needed in the above issues
    Thanks in advance
    Swaraj

    What you will want to do is look into JNLP and Java WebStart. They allow you to write a setup for your product that makes installation as easy as InstallShield&trade; does for the Windows&trade; platform (ie: it allows customers who cannot tell Java from Perl to install your product).

  • Urgent Help Needed: ATI Graphics Card install

    Hello All.... I am in need of some urgent help..
    I am trying to install a new graphics card - the ATI Radeon 9600 SE. I currently have a Voodoo3 card. I followed all of the instructions step by step, but when I plug the monitor to the Radeon card and boot up, I do not get any display. I have tried everything I can think of, and yet - I am sure the card is secured in place and the monitor is plug into the card.
    Can anyone help me on this one.. ATI's support is, well - lacking..
    Here is some info on my pc:
    MCI motherboard
    AMD Athlon(tm) XP 2000+ 1.7 GHz
    768 MB
    AMIINT - 10 Version 1.00, 07/10/02
    Could the problem be with switching from a regular PCI card to an AGP card???

    Quote
    Originally posted by southmike
    okay i'll bite what are omega drivers,
    how are they different from cat4.2 drivers
    i was suprised that the voodoo 3 would work in a AMD64 mobo...
    whoops....just read the rest of the post :lol:
    BTW is there an external power connector that needs to be plugged in?

Maybe you are looking for

  • How can avoid mandatory fields in data transfer

    hai please respond me how can avoid mandatory fields in data transfer like bdc

  • I have a Z570 laptop Win 7 64 bit and need a new mouse driver

    I just updated my Ethernet Driver on my Win 7 64 bit Z570 laptop.  Now, the icon for my Mouse no longer appears in the sys tray, and I can no longer scroll using the Mousepad.  In order to scroll, I have to go into control panel and open up the Mouse

  • IPhone Calendar

    I have an iPhone 4.  I use the calendar strictly on my phone - no synching with Mobile Me, iCal on Mac or Outlook.  STRICTLY THE PHONE.  I travel constantly. I have noticed ALL events over a month old are deleted from the calendar, making it complete

  • Finding deleted items, help!!!!

    My computer is old and doesnt store much space, last night i downloaded an hd show on itunes that was 1.34 gig., for my com this is a big hunk of space. So i tried to sync it to my ipod and because i have a classic it didnt work, anyway so i figured

  • Uninstalling Beta iWorks from Snow Leopard

    A colleague with a 2009 unibody MacBook Pro needs to install the latest iWork version, of which he has already purchased the retail box. However, sometime in the dim, dark and distant past he tried some beta version and now the installer says an erro