JRadioButton actionListener shows troble.plz help.

hai forum,
My project has a part where i select a class file,display its methods and then display JTextFields for the parameters of the method in a separate panel.
My problem is that clicking different radio buttons(methods) do not bring about a change in the panel.
my code for selecting and displaying method is
        public void selectClass_actionPerformed(ActionEvent e)
            if(e.getSource()==selectClass)
                //refresh panel
                methodPanel.removeAll();
                methodPanel.revalidate();
                //  Code To Generate a FileChooser
                 //instantiate class FilterClass
                JFileChooser jfilechooser=new JFileChooser();
                Filterclass filter=new Filterclass();
                //Set selection mode for file chooser
                jfilechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                //set file filter
                jfilechooser.setFileFilter(filter);
                int returnVal = jfilechooser.showOpenDialog(this);
                if(returnVal == JFileChooser.APPROVE_OPTION)
                    try
                            String str = jfilechooser.getSelectedFile().getName();
                            String parent=jfilechooser.getSelectedFile().getParent();
                            classFileList.addItem(str);
                            classFileList.disable();
                            // Create a File object on the root of the directory containing the class file
                            File file = new File(parent);
                            // Convert File to a URL
                            URL url = file.toURL();         
                            URL[] urls = new URL[]{url};
                            // Create a new class loader with the directory
                            ClassLoader cl = new URLClassLoader(urls);
                            StringTokenizer st = new StringTokenizer(str,".");
                            String s = st.nextToken ();
                             Class c = cl.loadClass(s);
                            //Get the Methods Of the Selected Path
                            Method methods[]=c.getDeclaredMethods();
                            for(int i=0;i<methods.length;i++)
                                int modifiers=methods.getModifiers();
if(Modifier.isPublic(modifiers)||Modifier.isStatic(modifiers))
String a= "";
a=methods[i].getName();
//Get the Parameters
Class[] parameterTypes=methods[i].getParameterTypes();
String parameterString = "";
for(int k=0;k<parameterTypes.length;k++)
if(k==0)
parameterString = parameterTypes[k].getName();
else
parameterString = parameterString+","+parameterTypes[k].getName();
parameterCount = parameterTypes.length;
System.out.println("num of para"+parameterCount);
/*Create RadioButton Dynamically*/
String radioName=a+"("+parameterString+")";
j=new JRadioButton(radioName);
methodPanel.add(j,true);
methodlistPane.getViewport().add(methodPanel,null);
j.setBounds(100,(100+(i*50)),100,50);
group.add(j);
//Class methodradioactionlistener implemented below
j.addActionListener(new MethodRadioActionListener());
}//end of if loop
}//end of for loop
}//end of try loop
catch(Exception e1)
StringWriter sw = new StringWriter();
e1.printStackTrace(new PrintWriter(sw));
String stacktrace = sw.toString();
System.out.println("stacktrace = " + stacktrace);
}//end of catch loop
}//end of if loop
}//end of e.getsource loop
}//end of method loop
And my MethodRadioActionListener is
        private class MethodRadioActionListener implements ActionListener
            public void actionPerformed(ActionEvent e1)
                    if(parameterCount==0)
                        textfieldPanel.removeAll();
                        textfieldPanel.repaint(); 
                        JLabel nopara = new JLabel();
                        nopara.setText("NULL PARAMETER");
                        nopara.setBounds(new Rectangle(210, 80, 175, 25));
                        textfieldPanel.add(nopara);
                        textFieldPane.getViewport().add(textfieldPanel,null);
                    } //END OF IF LOOP
                    else if(parameterCount>0)
                        textfieldPanel.removeAll();
                        textfieldPanel.repaint();
                        tf = new JTextField[parameterCount];
                        for(int j = 0; j < tf.length; j++)
                            //DISPLAYS TEXT FIELDS
                            tf[j] =new JTextField(null,5);
                            textfieldPanel.add(tf[j],true);
                            tf[j].setBounds((100+(j*100)),100,100,10);
                            textFieldPane.getViewport().add(textfieldPanel,null);
                        } //END OF FOR LOOP
                    } //END OF ELSE IF LOOP
            } //END OF ACTION PERFORMED METHOD
         } //END OF CLASS
         Clicking the radio button do not bring about any change.A single textfield is generated always.
Plz help me fix my mistake.
Thank you.

Yes, as you mentioned only one action is being done that is of the last method.I tried bringing the code ,ParameterCount=k; ,inside for loop so that it takes thenumber of parameters of only one method that i select.But still i find the same kind of action takes place.
Is there any other way out to solve my problem?How can i get the parameterCount of only one single method?
Is it advisable to write the radioButton actionPerformed method inside the actionPerformed method for selectClass menuItem, rather than as a separate class.
Thank you

Similar Messages

  • HT4061 sir  i have a iphone 4 my iphone 4 restore new version my ime is not showing so how is coming my ime plz help

    dear sir my iphone 4 is problem today i dnt no how
    i m just update the ios 7.0.4 so not showing ime
    plz help me

    Post in your native language. 
    It is unclear, what if any issue actually is occurring.

  • Plz. help,table does not show value for one field

    hi all,
    i have a really strange problem , i have a string field in access database that contains the date and time value,this field for some strange reason does not show in my table created through html,
    i tried all combination(arranging the fields) ,renaming it w/o help, it shows the value using out.println(but then why is it not showing me in the table???)
    plz. help ASAP.
    the code is as under
    <HTML>
    <HEAD><TITLE> LOGGED IN ok</TITLE> </HEAD>
    <BODY bgcolor = "yellow">
    <%@ page import = "java.sql.*" %>
         <%! // declaring variables
    String s = "";
    java.sql.ResultSet rs=null,rs1=null,rs2=null;
    java.sql.Connection con;
    java.sql.Statement stmt,stmt1;
    String empId = "",compid ="",calltype ="",probheader="",probdescription ="",probcomment ="",priority ="",a="";
    %>
    Following are the pending complaints ..
         <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 width="100%">
         <TR>
         <TD> ComplainD </TD>
    <TD> ComplainId </TD>     
    <TD> ProbHeader </TD>     
    <!--
    <TD> ProblemDescription </TD>     
    <TD> Problem Comments </TD>     
    -->
    </TR>
         <%
         try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};" +"DBQ=c:/vishal/HelpDesk.mdb;DriverID=22;READONLY=false","","");
         //java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:odbc:Portal");
              java.sql.Statement stmt = con.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_READ_ONLY);
              s = "select * from Complains";
         java.sql.ResultSet rs = stmt.executeQuery(s);               
                        while(rs.next())
                        //getting data from database
                                                           empId = rs.getString("EmpId");                    // out.print(" " + empId);
              compid = rs.getString("ComplainId");
              // out.print(" " + compid);
              calltype = rs.getString("CallType");
              // out.print(" " + calltype);
                        a = rs.getString("Complaindate"); //problem with this field
    out.print(a); // prints value
              %>               
                        <TR>      
                        <TD> <%=compid %> </TD>
                        <TD> <%=calltype %> </TD>     
                        <TD <%=a %> </TD>
                                       </TR>
    <%
                        }//while loop          
         %>
         </TABLE>     
         <%                
         }//try
              catch(Exception ep)
              out.println(ep);
              System.exit(1);
    %>
    </BODY>
    </HTML>
    value in database is as follows :-
    Complaindate
    5/18/2003 1:30:27 PM
    5/18/2003 7:32:43 PM
    5/18/2003 7:34:02 PM
    5/18/2003 7:49:19 PM
    5/18/2003 7:50:27 PM
    5/18/2003 10:49:42 PM
    5/18/2003 10:58:24 PM
    thanking u ,plz ask if any further clarifications

    Hi
    I am seeing nothing wrong with ur code..
    what about "view source" result.....plz check with that...
    whether u r getting all the trs and tds...
    revert back on this Issue..
    Mars Amutha

  • HT1414 C apple i need to know few things,first of all i shall tell my scenario. I got an iphone 3gs from my uncle in US. I m at india k. well , in that iphone it showing activation screen and trying to activate. not more than that..plz help!

    C Apple, i need to know few things,first of all i shall tell my scenario. I got an iphone 3gs from my uncle in US..after long waiting. I m from south india, living at God's country called Kerala k. well , in that iphone it showing activation screen and trying to activate. not more than that..plz help!
    means.. in simple words, it is trying to activate and all( searching wifi,, taking few minutes..again searching...if it couldnt find any wifi - telling .. try connect using itunes an all)...well any way. finally I try connect to a wifi network, with full speed...3mbps..from Ravi's internet cafe in downtown.
    All after Im getting the below message from that white candy box!( thats all I can use now, because, in my dreams iPhone is something great,  that mankind ever seen....but this really disappointed me......im simpling blinking!!(same with itunes too)
    ""Your iphone could not be activated because the activation server is temporarily unavailable. try connecting your iphone to itunes to activate it, or try again in a couple of minutes.
    If this problem persists, contact apple support at apple.com/support""
    EVERYDAY .EVERTIME.. I C this message and sleep....no use.....and i use to charge that 'white candy box' to c this message!
    I try searching internet and all for solutn...but no one knw about it..but there are...some one me abt method called jailbreaking ..rednw..white snw ..ultrasnw and all...I dnt knw why it is so complicated to troublesht...apple is suppose to be simple and friendly.
    C why u manufacturing these stuffz like this, if does'nt serve the any of its purpose ....or useable to any of its features atleast....C i wont be that disapppointed, if u put an option to playbck music or video during activation and all...
    If you are responsible for manfacturing such unuseable thing, then its ur responsible to destroy it too.....
    anyway now everyone knws that ..I have an apple iphone with me, but that doest make me proud at all...
    Finally I have only few questions to ask...
    1 will it work with my vodafone sim in kerala?
    2 is any way , i can hear any music out frm it?
    3 will i become a proud iPhone user?
    I am already fedup with asking questions..begging for an solution.....
    I hope so you can help to figure it out, without any complications....thank u!

    It was not legitimately unlocked by the carrier it was originally locked to. ONLY the carrier it is locked to can authorize unlocking it.
    In order to allow it to be used on a different carrier, the phone was hacked or jailbroken. An unauthorized modification was made to the phone. That modification has damaged the phone. You can not get support for it here or from Apple.

  • When i attach my iphone 4 with computer it shows one of the USB devices attached to this computer has malfunctioned and windows does not recognize it,now what can i do ..plz help me

    when i attach my iphone 4 with computer it shows one of the USB devices attached to this computer has malfunctioned and windows does not recognize it,now what can i do ..plz help me

    I would first try unplugging All the USB devices plugged into your computer, and then plug back in just the iPhone and see if that is recognized.  Also, do you have the latest version of iTunes for Windows installed on your PC, as you need to?
    Hope this helps

  • I have a new iPad wi-fi lte 16gb.when I try to sync thru I tunes it keeps on accessing I tunes stores.i have windows xp service pack 3.after running diagnostics it showed iTunes secure connection failed.unable to sync completely even once. Plz help.thanks

    I have a new iPad wi-fi lte 16gb.when I try to sync thru I tunes it keeps on accessing I tunes stores.i have windows xp service pack 3.after running diagnostics it showed iTunes secure connection failed.unable to sync completely even once. Plz help.thanks

    I'd try the following document: 
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • CS5 Styles not Showing up in LIVE VIEW PLZ HELP

    i looked at every other forum and cant find the anwser to my questions!!!! the styles show up until i click live view then they disappear!!!???? plz help
    <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
        <link href="css/styles.css" rel="stylesheet" type="text/css" media="screen">
    those are the style links
    let me know what you need to help me!!!! plz

    let me know what you need to help me!!!! plz
    98% of layout/display problems are caused by malformed code.
    1) Ensure that your code is valid (error free).
         Code Validation Tools
         CSS - http://jigsaw.w3.org/css-validator/
         HTML - http://validator.w3.org/
    2) Check that all paths to images, external style sheets and scripts are correctly pointing to your site folder and not to a file:/// on your local hard drive.
    3) If that doesn't help, upload your problem page to a remote server space and provide us with a link so we can see it in our browsers.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • HT201077 photos not getting added up in my photostream. It's showing some kinda registry error in my windows. Plz help

    photos not getting added up to my photostream. It's showing some kinda registry error in my windows. Plz help!!

    Hi Melissa_C!
    I have an article for you that may help shed light on this circumstance:
    iCloud: My Photo Stream FAQ
    http://support.apple.com/kb/ht4486
    How long are My Photo Stream photos stored in iCloud?
    The photos you upload to My Photo Stream are stored in iCloud for 30 days to give your devices plenty of time to connect and download them.
    How many photos are stored in My Photo Stream on my devices and computers?
    iCloud pushes all your photos to the My Photo Stream album on your devices and computers, and manages them efficiently, so you don’t run out of storage space.
    Your iOS devices keep a rolling collection of your last 1000 photos in the My Photo Stream album. From there, you can browse your recent photos or move the ones you like to your Camera Roll or another album to keep them on your device forever.
    Because your Mac and PC have more storage than your iOS devices, you can choose to have all of your My Photo Stream photos automatically downloaded. In iPhoto or Aperture preferences on your Mac, select Photos (or Photo Stream) > My Photo Stream > Automatic Import. All of your photo stream photos will be imported into your Events, Projects, Photos, Faces, and Places folders in iPhoto or Aperture. On your PC with My Photo Stream enabled in the Control Panel, all of your photos will be imported into C:\\Users\<user name>\Pictures\iCloud Photos\My Photo Stream. For iCloud Control Panel 2.0 to 2.1.2 users, the path isC:\\Users\<user name>\Pictures\Photo Stream\My Photo Stream .
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • I deleted my download folder by accident  i waz moving it and it just deleted it and showed this smoke. i found it in my trash so put it on my dock then clicked on it and it shows preview?! plz help how do i get it back!!!

    i deleted my download folder by accident  i waz moving it and it just deleted it and showed this smoke. i found it in my trash so put it on my dock then clicked on it and it shows preview?! plz help how do i get it back!!!

    You need to restore the folder using the (Put back) selection (CTRL click).

  • Hi my brother gave me his iphone 3gs,i using it in india .if i insert india sim,it is showing the No Service,what should i do plz help me in this

    Hi my brother gave me his iphone 3gs,i using it in india .if i insert india sim,it is showing the No Service,what should i do plz help me in this

    Is the device officially unlocked from the carrier? Was it purchased unlocked?
    If not... it cannot be used with any other carriers SIM until it is unlocked.
    Not all carriers offer unlocking.

  • I don't have any photos in my macbook but when i check the storage there it shows almost 1gb storage occupied by only photos. plz help!!!

    I don't have any photos in my mac at all yet here it's show i have almost 1 gb of photos how? i don't understand i tried looking for it yet i couldn't find it anywhere.
    Having a 128gb mac space is a big issue for me and all these are uselessly taking so much space.
    plz help
    Thanks in Advance

    <sigh>
    What part of "Ignore" is not clear? No you shouldn't worry about it.
    You have loads of photos on your Mac - things like icons and other interface elements, screenshots in Help files and such things.
    Really. You don't have a problem. You can remove all those images files if you want, it's just that your Mac won;t work if you do.

  • I have iPhone 4s but not show face time logo on my home screen and my settings.. Plz help me..

    my face time app is not waiting and not show in my iPhone 4s and in settings.. What can I do ... Plz help me

    Do as the image on the screen suggests, connect the device to a computer running iTunes and restore.

  • Problm with tiledlayer object not showing on screen!! plz help

    im making a small chess game my chess board is made of Tiledlayer and my chess elements are also Tiledlayer wheneever a move is made i have to make changes to my chess elements cells. but i make changes and they appear on my tiledlayer object but dont show on screen...
    when during game when i press FIRE_KEY first time my code goes to a thread and starts a rectangle which blinks and when i press fire again the tiled_layer is updated such that my chess element is moved from selected position to desired position.... but i dont c the change on screen....
    here is the complete code of chess board class...
    * @(#)ChessCanvas.java
    * @author Aaqib
    * @version 1.00 1007/9/19
    import javax.microedition.lcdui.*;
    import javax.microedition.lcdui.game.*;
    public class ChessCanvas extends GameCanvas implements Runnable{
         private  final int SCREEN_X = getWidth();
         private  final int SCREEN_Y = getHeight();
         private int boardSize = 128;
         // starting point of our chess game
         private int startX = (SCREEN_X - boardSize)/2;
         private int startY = (SCREEN_Y - boardSize)/2;
         // create bounding rectangle to know the end of chess board;
         private int endX = startX + boardSize;
         private int endY = startY + boardSize;
         private static final byte BOARD_COLUMN = 8;
         private static final byte BOARD_ROWS = 8;
         private static final byte TILE_DIMENSION = 16;
         // current X, Y position of cursor
         private byte currentCursorRow;
         private byte currentCursorColumn;
         // the row column which r selected
         private byte selectedRow;
         private byte selectedColumn;
         // the current pixel lcoations
         private int currentPixelX;
         private int currentPixelY;     
         // check if selected. convert curser to red
         private boolean selected = false;
         // background color
         private int white = 0xFCFCFC;
         // the chess board tiled Layer
         private TiledLayer tiledLayer;
         // the chess elements
         private TiledLayer chessElements;
         // layer Manager to add tiles and sprites;
         private LayerManager layerManager;
         // the cursor which selects and moves the objects
         private Sprite cursor;
         // matrix representing the chess board;
         private final byte chkBoard[][] ={
                                       {2,1,2,1,2,1,2,1},
                                       {1,2,1,2,1,2,1,2},
                                       {2,1,2,1,2,1,2,1},
                                       {1,2,1,2,1,2,1,2},
                                       {2,1,2,1,2,1,2,1},
                                       {1,2,1,2,1,2,1,2},
                                       {2,1,2,1,2,1,2,1},
                                       {1,2,1,2,1,2,1,2},
         private final byte elements[][] = {
                                              {6,2,5,4,3,5,2,6},
                                              {1,1,1,1,1,1,1,1},
                                              {0,0,0,0,0,0,0,0},
                                              {0,0,0,0,0,0,0,0},     
                                              {0,0,0,0,0,0,0,0},
                                              {0,0,0,0,0,0,0,0},
                                              {7,7,7,7,7,7,7,7},
                                              {12,8,11,10,9,11,8,12}          
         private Graphics g;
         // main constructor
        public ChessCanvas() {
             super(true);
                  setFullScreenMode(true);
                  init();
         * Initialize all GUI components
        public void init(){
          try{
                 Image spriteImg = Image.createImage("/cursor.png");
                 cursor = new Sprite(spriteImg,15,15);
                 cursor.setRefPixelPosition(startX - TILE_DIMENSION, startY - TILE_DIMENSION);
                Image img = Image.createImage("/board.png");
                Image elmt = Image.createImage("/chess.png");
                tiledLayer = new TiledLayer(BOARD_COLUMN, BOARD_ROWS, img, TILE_DIMENSION, TILE_DIMENSION);
                chessElements = new TiledLayer(BOARD_COLUMN, BOARD_ROWS, elmt,16,16);
                layerManager = new LayerManager();           
                currentCursorRow = 5;
                currentCursorColumn = 6;
                for (int y = 0; y < BOARD_COLUMN; y++){
                     for (int x = 0; x < BOARD_ROWS; x++){
                          int grid = chkBoard[y][x];
                          int data = elements[y][x];
                          tiledLayer.setCell(x,y, grid);
                          chessElements.setCell(x,y,data);
                g = getGraphics();
                // sets the position of chess board in center
                tiledLayer.move(startX, startY);
                chessElements.move(startX,startY);
                layerManager.append(cursor);
                layerManager.append(chessElements);
                layerManager.append(tiledLayer);
                moveCursor(currentCursorColumn * TILE_DIMENSION, currentCursorRow * TILE_DIMENSION );
          catch(Exception exception ){
                 System.out.println("exception in init method  --  "+exception.toString() );
        public void start(){
             Thread thread = new Thread(this);
             thread.start();         
        public void run(){
             while (true){
                  // check game state;
                  //checkState();
                  // check the userinput
                  checkUserInput();              
                  updateScreen(g);
                  flushGraphics();
                  try{
                       Thread.currentThread().sleep(300);
                  }catch(Exception exception){}
        private void checkUserInput(){
             int keyState = getKeyStates();
             switch(keyState){
                  case FIRE_PRESSED:
                       if (selected){
                            selected = false;
                            // make the move
                            logging ("selected >>  row  "+selectedRow+"  column   >>  "+selectedColumn +"\n");
                            logging ("current >>  row   "+currentCursorRow+"  column   >>  "+currentCursorColumn +"\n");
                             int selectedItem = chessElements.getCell(selectedRow,selectedColumn);
                             logging("selected item  >>  "+selectedItem+"\n");
                             chessElements.setCell(currentCursorRow,currentCursorColumn,selectedItem);
                             chessElements.setCell(selectedRow,selectedColumn,0);
                             chessElements.setCell(6,6,7);
                             logging ("selected >>  row  "+selectedRow+"  column   >>  "+selectedColumn +"\n");
                            moveCursor(0,0);
                       }else{
                            selected = true;
                            selectedRow = currentCursorRow;
                            selectedColumn = currentCursorColumn;
                            chessElements.setCell(6,6,7);
                       animateSelectedItem();
                  break;
                  case UP_PRESSED:
                       if (!cursor.isVisible())
                            cursor.setVisible(true);          
                       if (currentCursorRow == 1){
                            if (currentCursorColumn == 8){
                                 currentCursorColumn =1;
                                 currentCursorRow = 8;
                                 currentPixelX = -112;
                                 currentPixelY = 112;
                                 //moveCursor(-112,112);
                            }else{
                                 currentCursorColumn++;
                                 currentCursorRow = 8;
                                 currentPixelX = TILE_DIMENSION;
                                 currentPixelY = 112;
                                 //moveCursor(TILE_DIMENSION,112);
                       else{
                            currentCursorRow--;
                            currentPixelX = 0;
                            currentPixelY = -TILE_DIMENSION;
                            //moveCursor(0,-TILE_DIMENSION);
                       moveCursor(currentPixelX,currentPixelY);
                  break;
                  case DOWN_PRESSED:
                       if (!cursor.isVisible())
                            cursor.setVisible(true);
                       if (currentCursorRow == 8){
                            if (currentCursorColumn == 8){
                                 currentCursorColumn =1;
                                 currentCursorRow = 1;
                                 currentPixelX = -112;
                                 currentPixelY = -112;
                                 //moveCursor(-112,-112);
                            }else{
                                 currentCursorColumn++;
                                 currentCursorRow = 1;
                                 currentPixelX = TILE_DIMENSION;
                                 currentPixelY = -112;
                                 //moveCursor(TILE_DIMENSION,-112);
                       else{
                            currentCursorRow++;
                            currentPixelX = 0;
                            currentPixelY = TILE_DIMENSION;
                            //moveCursor(0,TILE_DIMENSION);
                       moveCursor(currentPixelX, currentPixelY);
                  break;
                  case LEFT_PRESSED:
                       if (!cursor.isVisible())
                           cursor.setVisible(true);
                       if (currentCursorColumn == 1){
                            if (currentCursorRow == 1){
                                 currentCursorColumn =8;
                                 currentCursorRow = 8;
                                 currentPixelX = 112;
                                 currentPixelY = 112;
                                 //moveCursor(112,112);
                            }else{
                                 currentCursorColumn = 8;
                                 currentCursorRow--;
                                 currentPixelX = 112;
                                 currentPixelY = -TILE_DIMENSION;                       
                                 //moveCursor(112,-TILE_DIMENSION);
                       else{
                            currentCursorColumn--;
                            currentPixelX = -TILE_DIMENSION;
                            currentPixelY = 0;
                            //moveCursor(-TILE_DIMENSION,0);
                            moveCursor(currentPixelX, currentPixelY);
                  break;
                  case RIGHT_PRESSED:
                       if (!cursor.isVisible())
                           cursor.setVisible(true);
                       if (currentCursorColumn == 8){
                            if (currentCursorRow == 8){
                                 currentCursorColumn =1;
                                 currentCursorRow = 1;
                                 currentPixelX = -112;
                                 currentPixelY = -112;
                                 //moveCursor(-112,-112);
                            }else{
                                 currentCursorColumn = 1;
                                 currentCursorRow++;
                                 currentPixelX = -112;
                                 currentPixelY = TILE_DIMENSION;
                                 //moveCursor(-112,TILE_DIMENSION);
                       else{
                            currentCursorColumn++;
                            currentPixelX = TILE_DIMENSION;
                            currentPixelY = 0;
                            //moveCursor(TILE_DIMENSION,0);
                       moveCursor(currentPixelX,currentPixelY);
                  break;
        public void updateScreen(Graphics g){
             g = getGraphics();
             // set the background color
             g.setColor(white);
             g.fillRect(0, 0, getWidth(), getHeight());
              // draw the board         
             tiledLayer.paint(g);
             // paint the cursor
             cursor.paint(g);
             // chess elements
             chessElements.paint(g);
        private void moveCursor(int x , int y){
             //logging(" cursor  >>   "+cursor.getFrame());
             // red cursor selected
             if (selected){
                  //logging("red");
                  cursor.setFrame(1);
             }else{
                  // normal green cursor moving
                  //logging("green");
                  cursor.setFrame(0);
             cursor.move(x,y);
         * Animate the selected Item. runs a saperate thread;
        private void animateSelectedItem(){
             cursor.setVisible(false);
             new Thread(new Runnable() {
                  Graphics g = getGraphics();
                  public void run(){
                           while(selected){
                            try{
                                 Thread.currentThread().sleep(600);
                            }catch(Exception exception){
                                 System.out.println("exception in animating sprite");
                             g.setColor(0xF71302);
                             g.drawRect((startX+ (selectedColumn * TILE_DIMENSION))-16,
                                            (startY+ (selectedRow * TILE_DIMENSION))-16, 14, 14 );
                            flushGraphics();
             }).start();
        private void logging (String str){
             System.out.print(str);
    }plz help me....
    thanks :(

    {color:#000080}I don't know whether that's the only thing wrong here, but I see 3 calls to getGraphics(). The documentation for javax.microedition.lcdui.game.GameCanvas.getGraphics() says:{color}
    A new Graphics object is created and returned each time this method is called; therefore, the needed Graphics object(s) should be obtained before the game starts then re-used while the game is running.
    {color:#000080}-- Your call to getGraphics() in updateScreen(Graphics g) will return the reference to the local variable represented by the parameter g, which will be out of scope as soon as the method returns.
    -- Your call to getGraphics() in animateSelectedItem() assigns the reference to a newly declared local variable, which too will be out of scope when the method returns. (But this method includes flushGraphics() so just possibly this g is flushed to the display.)
    db{color}

  • Plz help!!!!! i have iphone 3g and i have chose the option of reset to factory shipped settings ... but now it does not start .. it just shows apple logo thats it .... plz can anybody help me

    plz help !!!! i have iphone 3g and i tried option to reset my phone to factory shiped settings ..... but now it does not start even .. it just shows apple logo again n again ..... after that i went to recovery mode as stated by apple support and did things as stated .... but then i got the message iphone cannot be restored due to some eror 1015.....can any one please help me .. i will be highly obliged ...

    First try a Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least Ten seconds... (But can take Longer)... until the Apple logo appears. Release the Buttons
    If no joy... Try a Restore...
    1: Connect the device to Your computer and open iTunes.
    2: If the device appears in iTunes, select and click Restore on the Summary pane.
    3: If the device doesn't appear in iTunes, try using the Steps in this article to force the device into Recovery Mode.
    From Here
    http://support.apple.com/kb/TS3281
    Make sure you have the Latest Version of iTunes (v11) Installed on your computer
    iTunes free download from www.itunes.com/download
    Note on Recovery Mode.
    You may need to try this More than Once... Be sure to Follow ALL the Steps...
    Once you have Recovered your Device...
    Re-Sync your Content or Restore from the most Recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766
    Note:
    Also consider Deleting any Apps you have Purchased / Downloaded but you now never use...

  • I'm not able to update my ipad from 4.3.5 to ios5. its always showing an error 3195 whi isit so.. Plz Help me

    i'm not able to update my ipad from 4.3.5 to ios5. its always showing an error 3195 whi isit so.. Plz Help me

    I don't think bulk update for password is supported in R1(same in R2). Find below statement in oracle doc
    Support Bulk Update: Determines if the field can be modified as part of a bulk modification of multiple users. Fields that are expected to be unique to users, such as username, name fields, and password, do not support bulk update. For fields with System Controled=Yes or Unique=Yes, this property can never be set to Yes. For information about setting the properties of an attribute, see "Configuring User Attributes" in the Oracle Fusion Middleware Administrator's Guide for Oracle Identity Manager.

Maybe you are looking for