NEED HELP COMPILING AN APPLET AND FIXING AN ERROR

Hi this is my applet that i am having a problem compiling.
import java.applet.*;
import java.awt.*;
public class Texts2 extends Applet
     TextArea source;
     TextArea destination;
     Button copy;
     public void init()
          source = new TextArea(10,30);
          add(source);
          copy = new Button("Copy ->");
          add(copy);
          destination = new TextArea(10,30);
          add(destination);
          validate();
     public boolean action(Event evt, Object arg)
          String temp;
          if(evt.target == copy)
               temp = source.getSelectedText();
               if (destination.getText() =="")
                    destination.setText(temp);
               else
                    destination.append(temp);
}Here is the full error message after i have typed javac Texts2.java in the command prompt:
Texts2.java:34: missing return statement.
Note: Texts2.java uses or overides a deprecated API.
Note: Recompile with -Xlint deprecation for details.
1 error
What is the missing return statement?
What does Recompile with -Xlint deprecation for details mean?
How do i do this?
Rafeeq
Edited by: rafeeq on Jan 9, 2008 1:42 PM

duffymo wrote:
you've got three notes, all with the caps lock on, asking for the same lame advice.Actually it was four notes.
@rafeeq
Here's another tutorial
http://java.sun.com/docs/books/tutorial/reallybigindex.html
comeback when you learn the basics.

Similar Messages

  • I keep receiving this error every time I open LR, "Lightroom encountered and error when reading from its preview cache and needs to quit" and the app won't open. It said LR would try and fix this error next time I opened it but the error remains. I tried

    I keep receiving this error every time I open LR, "Lightroom encountered and error when reading from its preview cache and needs to quit" and the app won't open. It said LR would try and fix this error next time I opened it but the error remains. I tried uninstalled and installing the app and the error remains. I have windows 8. Can anyone please help???

    Use Windows Explorer to open the folder containing your catalog. The normal location is Pictures\Lightroom. Locate a folder with the extension .lrdata and delete that folder. Then you should be able to start Lightroom again, and Lightroom will begin building and new previews folder. Do not delete anything else.

  • I need help in getting VZ to fix my DSL speed - they refused to fix it two times

    I live in E. Boston and opened a trouble ticket on 8-26-13 for slow internet speed. Ticket number was {edited for privacy}Agreement was made for a tech to arrive on the 28th between 1 and 5 PM. Somebody showed at my door on the 28th at 11:15AM. He immediately said that he had already done some outside checking and there was a problem outside of my home. I showed him my slow connection speed and he left saying he would be back later. I saw him on poles around my home and he called later saying he needed help from his office and would let me know the status by 3PM or so. I never heard from him again. I continued to check the ticket status and it was open.
    On Friday, Aug. 30th, about 9:15AM, I received a call from a VZ telephone tech named Rich. He again did some outside checking and came into my home. I showed him my slow internet speed and he went back outside after telling me that he had no test equipment but he would go back outside to see what he could do and call his manager since he was not a VZ internet tech. He came back a little later and told me that he did all that he could do and asked me to run my tests again. I did so in front of the tech and the speed was at least 30% slower than it is supposed to be. The VZ telephone tech said he would call for help from his office to send a tech with proper test equipment and he left. A number of hours passed and the VZ telephone tech called and told me HIS MANAGER TOLD HIM TO CLOSE THE TICKET AND TO SEND THE MANAGER THE INFORMATION.
    I immediately asked for and got the name and office of the manager that did this and I have it. I will hold off posting it for a couple of days but then I will let everyone know how this Verizon manager performs as well as who he is. I wonder how his superiors will like that?
    Does anyone have any suggestions who in Verizon cares enough to get my problem resolved? I have already filed a complaint with the AGO today. Verizon does this to keep their numbers from being respective of what they really are as well as knowing that customers do not want to again walk through all of the crap in opening a trouble ticket in India. I have been in telecom for 45 years and this is just disgraceful. It is about time VZ developed some integrity.

    Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you.Please go to your profile page for the forum, and look in the middle, right at the top where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
    Under “My Support Cases” you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis as the agent may be waiting for information from you before they can proceed with any actions. Please keep all correspondence regarding your issue in the private support portal.

  • I need help, yesterday I installed and reinstalled the Yosemite system and take long to turn on my laptop, the bar takes to fill, and I'm worried. Can you help? thank

    I need help, yesterday I installed and reinstalled the Yosemite system and take long to turn on my laptop, the bar takes to fill, and I'm worried.
    Can you help? thank

    revert back to Maverick that is what I had to finally do. This was the worst upgrade I have ever seen. Hopefully you have Time Machine backup and can revert back. It was pretty painless except for a few issues. I will wait until Apple gets their stuff together on this upgrade or may never will.

  • Need help with Blog, Wiki and Gallery

    Hi Team,
    Need help with Blog, Wiki and Gallery startup. I have newly started visiting forums and quite interested to contribute towards these areas also.
    Please help.
    Thanks,
    Santosh Singh
    Santosh Singh

    Hello Santhosh,
    Blog is for Microsoft employees only. However, you can contribute towards WIKI and GALLERY using the below links.
    http://social.technet.microsoft.com/wiki/
    http://gallery.technet.microsoft.com/

  • Need help FLASH not launching and not uninstalling "licensing for this product has stopped working".

    Need help FLASH not launching and not uninstalling "licensing for this product has stopped working" and " you can only install one adobe product at a time please complete the other installation"  Flash was working absolutely fine before, I have no idea why this happened.

    I am having similar problem.  Can't open any of CS3 programs after trying to download Dreamweaver Trial, which wouldn't work because "couldn't remove DLM extention" error message.  So now I can not run Illustrator, Photoshop, or even Adobe Reader.  These are properly licensed for about a year. I get "License for product has stopped working".  Have 2 pending cases open with Adobe support (one for Dreamweaver trial, one for license problem) since 8/3 with NO ANSWERS - It says answers within 1-3 business days.  Was on phone support hold today for over 3 hours before line went dead with no help.  What is up with adobe support?  Can anyone help?

  • I need help importing navigation bars and rollover buttons from fireworks?

    I need help importing navigation bars and rollover buttons from fireworks, drop down menus and rollover states won't work!
    Thanks

    In my experience, the code created by graphics apps is less than satisfactory. And image based menus are very awkward for several reasons. 
    #1 If you decide to change your menu later, you must go back to your graphics app and re-craft the whole thing.  After 2-3 times of this, it gets old in a hurry.
    #2 Image based menus cannot be "seen" by search engines, screen readers and language translators.
    #3 CSS styled text menus are better for your site's visibility, accessibility and they are a snap to edit in Dreamweaver.
    That said, if you're still married to image based menus, use Fireworks to create images only. Use Dreamweaver's Image Rollover Behaviors to create your rollover scripts.
    Nancy O.

  • Installed CS6 all but Illustrator installed correctly, I received error DF024, DW063, and DW050, how can I install Illustrator and fix these errors?

    installed CS6 all but Illustrator installed correctly, I received error DF024, DW063, and DW050, how can I install Illustrator and fix these errors?
    this is the log error file I get:
    Exit Code: 6
    Please see specific errors and warnings below for troubleshooting. For example, ERROR: DF024, DW063 ...
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 4 error(s), 0 warning(s)
    ----------- Payload: {AAF0D225-F129-40F2-916E-12E28DBD19ED} Adobe Illustrator CS6 Core 16.0.0.0 -----------
    ERROR: DF024: Unable to preserve original file at "/Applications/Adobe Illustrator CS6/Adobe Illustrator.app/Contents/Frameworks/AdobeCrashReporter.framework/AdobeCrashReporter" (Seq 1649)
    ERROR: DW063: Command ARKDeleteFileCommand failed.(Seq 1649)
    ERROR: DW050: The following payload errors were found during install:
    ERROR: DW050: - Adobe Illustrator CS6 Core_AdobeIllustrator16en_USLanguagePack: Install failed
    ERROR: DW050: - Adobe Illustrator CS6 Core: Failed due to Language Pack installation failure

    hold down shift-cmd-alt while starting ai.  if done correctly, you'll see a preferences reset prompt.
    if that fails, uninstall, clean and reinstall per Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • Two days ago, I loaded Light Room 6. Today I went back to Light Room 5. LR 6 corrupted an entire folder of images, and caused errors on my Raid 5 causing win 7 to run "Chk Dsk" and fix the errors to the operating system. LR 5 has not shut down for the las

    Two days ago, I loaded Light Room 6. Today I went back to Light Room 5. LR 6 corrupted an entire folder of images, and caused errors on my Raid 5 causing win 7 to run "Chk Dsk" and fix the errors to the operating system. LR 5 has not shut down for the last 5 hours. LR 6 has a serious bug. Anyone else experiencing this problem. Yesterday I was on tech support, waiting for 3 hours, finally they picked up and informed me there department was closing and someone else would call me on Monday. So, I'm working today and all day Sunday to make up for the down time using LR 6.
    I don't know if the bug exists in the program or the "Creative Cloud.
    Question: Does anyone know why if I bought Light Room 6 [NOT Light Room CC with the monthly rental], I have to enter my serial number if I want to use it?

    Entering the serial number is probably part of the registration process.
    Just out of curiosity, what were you doing on LR6 when the folder of images became corrupted?

  • Windows 8.1 need help with Windows Updates and Start menu Or fix my old Windows Xp system

    My beloved windows Xp has gave up after many years of working well. It stopped working a few days ago after a lightening strike.
    I got this Windows 8.1 computer a few month ago  but it seems to have a problem. I stopped using it after could not get start menu to work and when back to my Windows XP system.
    First problem is the start menu is not there. I tried installing something and it says it will take control or something and screen goes black. I clicked canceled quickly in order not to get a virus.
    Where is the start menu?
    Second problem, Windows updates does not want to update because it needs Windows 8.1 update. This computer is already Windows 8.1. There I canceled it since it was mostly a virus. Now updates are not working.
    If those can not be fixed, how can i fix my Windows Xp to get it back. It does not turn on, I press button and nothing happens. Is this something easy to fix?

    Another user discovers that Windows 8.1 is not at all of what it should be.
    There is no Start Menu in Windows 8 or 8.1.  However, you can restore your desktop start menu with a very good freeware application: 
    Classic Shell
    Windows Update comes with Windows 8.1.  There is nothing special you have to do.
    It kind of sounds like you've been a bit too quick to download and run whatever you find on the Internet.  You should always research any software you're considering downloading/installing ahead of time.  Google it.  See what others say
    about it.  Ask on forums.  In order to use Windows effectively and safely you need to expand your knowledge and become a more sophisticated user.
    If you think your new system has become infected, you might want to consider Refreshing or Resetting it to a clean state, or at least visiting one of the anti-malware forums and getting some advice on cleaning it up.  But beware, a lot
    of "blind leading the blind" happens on forums.  Always try to read between the lines, and question what people say.
    You could consider leaving XP behind.  Its time has come and gone, and pretty much any newer version of Windows can actually give you better service than XP - once you get it tuned up.
    It's possible to make Windows 8.1 more functional than XP and about as functional as Windows 7, but it takes a fair bit of effort in reconfiguration and installation of some well-known 3rd party applications that are good (which, unfortunately, most
    on the internet are not).
    Good luck to you.
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • Need help getting my applet to run..

    Hi, I am having the utmost trouble getting my applet to run. First I spent a month correcting syntax and other errors generated during compile. Now I find myself spending another month getting the compiled product to run. I don't care if the screen is completely blank and my logic is all messed up, I don't mind logic debugging. My applet just will not run at all, it won't even initialize.
    First when I tried to run my applet in Internet Explorer I got the following error in the statusbar:
    "load: tsorgi5 can't be instantiated"
    So, I researched that error message, and the solution appeared to be that I would need to use the Java Plug-In. So, I use that and now I find this message in the statusbar:
    "exception: null."
    That happens when the text "Loading Java Applet ..." is in the centre of the applet, and Internet Explorer acts like it is still doing something no matter how long I wait.
    I tried researching this, but only found "exception: null" with other things after the text "null."
    In Forte, when I choose "Execute" I get the following in the Output Window, I/O tab:
    java.lang.NoSuchMethodError: main
    Exception in thread "main"
    I would assume it expects me to add a method "main()," but I also get that same message with a different applet (which doesn't have a method "main()") which runs perfectly fine.
    I usually try to solve many of my problems myself, but with this one I have no idea where to start looking for answers. I'm relatively new to Java, been using Java for only half a year, so this particular problem is like looking for a four-leaf clover in the streets of New York City..
    I'm going to be chopping my applet into pieces, having a separate class file for each major engine. (It is a role-playing game, so I'll separate battle engine from cut-scene engine from world exploration engine etc..) Hopefully I will be able to narrow down my search for what is causing me all of these problems. Then once I solve my problems I can piece everything back together.
    In the meantime, I am hoping that some of you could help me out so that I may know what I am looking for.
    Thank You for your time,
    -Tony Slater

    Ah.. Forte is still a bit confusing to me, I have not and probably will not take the time to learn much about Forte, as the only real reason I use it is because unlike wordpad, I can see line numbers. =] Very helpful with my program being the size that it is.
    I do not think that the simple applet idea will be of much use, because one of my earlier applet projects (a main menu for my current project) which I mentioned above as another applet without a main() method which worked perfectly fine is very simple. Although I will try it anyway, as it could help and you are most likely much more experienced than I. =]
    Okay, I typed the following in the Dos Prompt:
    appletviewer TestApplet.class
    ..It printed a blank line, paused a little bit, then brought me back to the prompt, just like running a dos program that does not give any output. I'm not sure, but I would assume it should print a line containing the text "Here?" I have not used appletviewer before, so I do not know what it is supposed to do. =P
    I have already tried using System.out.println, but the problem occours even before the applet is started. I'll try enabling the Java Console first thing tomorrow morning, since a restart is required when enabling it.
    Now, I would be happy to post some code, but I'm not sure it would be best to post the code when my program is 2814 lines.. although 800 lines are probably comments, and most of those comments are probably irrelevant. Also I can sometimes be a messy coder. Although I can post some general information and can probably (with a little work) post an "outline" of the code.
    Since it is getting late I'll just post some portions of code which hopefully will prove important.
    // Import Packages
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.*;
    import java.applet.*;
    import java.lang.System;
    import java.lang.reflect.Array;
    import java.lang.Math;
    import java.lang.Double;
    import java.math.*;
    import java.util.Random;
    import java.io.*;
    variable/object types created and/or declared between "public class.." and "public void init()...":
    int
    byte[]
    String
    RandomAccessFile
    int[][]
    double
    int[]
    double[][][]
    Random
    Image
    int[][][]
    arrays are filled in the init() method.
    public String getIniStrValue(String iniFile, String iniGroup, String iniItem) // Used for retrieving information from the game's external file system.
    another method getIniIntValue(int, String, String, String) is used for int values stored in external files.
    Within public void paint(), gameplay modes are detected and dealt with accordingly. With Cut-Scenes, proper charecter images and text is displayed, all cut-scene information is stored externally. Other modes do virtually the same, display graphics and text based on internal game data or un-changing external data files.
    Within public void mouseClick(), in certain modes of the game the mouse click will trigger a change no matter where the user clicked (such as cut-scenes, to advance to the next line of dialog), or different variables are set depending on where the user clicked. (What I like to call.. custom buttons) At the end of the method repaint(); is used, and the paint() method will alter the screen according to any changes that may have happened.
    public void charAttack() is a method called to handle battle equations when a playable and controllable charecter is making a move. It will detect the current charecter, detect the move being made by the charecter (attack, special move, magic, etc) and will change any variables accordingly and will then use repaint(); so that the player may know what has happened. (Whether or not attack was successful, how many HP the enemy lost, etc)
    public void loadBattle() is called when the charecter encounters an enemy. It will load possible enemies of the current part of the world being explored, select one, then load that enemy's "stats" from external game data files, and will then specify the new mode (Battle Menu, where the player chooses the moves to be made for the turn) by setting the int value "Mode." repaint(); is then called and it will paint the battle menu.
    public boolean keyDown() is of course used to detect keyboard events. In world exploration, the charecter will be moved accordingly. In modes such as cut-scenes, a variable will be changed to advance to the next line of speech. In menus, the keyboard events are used to switch between options. repaint(); is used to update the screen accordingly.
    Well, even though I very briefly summarized the code, it appears to have taken half an hour to do. I'll be getting some sleep in a few minutes, and when I wake up tomorrow morning I hope to both see and make some progress on solving this problem.
    Thank You,
    -Tony Slater.

  • FCP Novice needs help with video quality and FCP 5!!

    Hi,
    I have a real problme that I cannot seem to fix. I think its because I am doing something really wrong!
    I have a Sony HC42E MiniDV Camcorder which by default records video in full widescreen. I recorded several tapes this way and have now begun trying to edit them in FCP 5.04 (Tiger 10.4.6). Whenever I log and capture my clips they appear to be fuzzzy and unclear on the Mac monitor whilst being totally crisp and sharp on the camcorder viewfinder. I tried capturing using the DV PAL 48Khz Anamorphic Preset which keeps everything the right size (the final output needs to be true widescreen and not with black bars added) but the resulting video on screen is blurry and bitty. I then tried capturing using the DV PAL 720 x 576 normal preset and the video is a little clearer on the screen (for both presets I have chosen lower field dominance) but when I play back it plays back in widescreen on the mac canvas window but at 4:3 on the camera's viewfinder.
    I then assumed that maybe this is just becuase the mac screen (CRT by the way) doesn't use fields. So I exported the sequence as a QT movie using DV PAL 16:9 and used quicktime (OS9 Classic - my compressor has never worked because of the dreaded "unable to connect to baackground process" problem which I've never managed to correct) to convert it to MPEG2. When I import this as an asset into DVD Studio pro 4 and set the track size to 16:9 it comes through at the right aspect ratio. However it looks blurry on screen. Thinking that this will be fine on a TV I burned the disc - inserted it into my DVD player (a good one!) and watched it on my new 32" widescreen TV (a good one!) and the picture qualitty is poor. Its so much blurrier and bittier than the original footage looks when played through the camcorder's viewfinder!
    The final footaage looks like an old VHS recording that's a year or two old!
    Does anyone know how I can capture my footage in FCP with the maximum quality, edit it without quality loss and the export it for DVD again without such significant quality loss whilst all the time keeping it at proper 16:9 widescreen?
    Is there some presets I should be working to?
    I'm tearing my hair out! Help!

    Hi Guys,
    thanx for your replies.
    here's the latest:
    Brian, I followed your instructions and the DVD burned successfully. However the video quality of the dvd when viewed on my TV ('ve tried on all 3 of my tvs now) is still a lot poorer than the quicktime movie that was imported into DVDSP4. When I play the original QT Movie on my Mac CRT monitor it looks a little blurry and grainy because I guess its non interlaced however when viewed on an external Video monitor it looks great - very sharp.
    When I view the burned DVD on my television the picture quality looks like the non interlaced version of the original QT Movie that appeared on my Mac CRT and not the sharp interlaced (lower field) version that appeared on my external video monitor.
    Its almost like taking a sharp jpeg into Photoshop and applying a gaussian blur of about 0.3 followed by jepg compression compressing it down to 5% quality!
    I'm totally mystified. Can the conversion to Mpeg2 be removing all interlacing so that you get the less sharp computer monitor look? I just want the video on my final DVDs to be as good as the original source footage! I appreciate that along the way there might be loss of some quality but surely not that much?
    Does this make sense to you guys or am I still doing something very wrong?
    Robert: I have tried setting all manner of drives including a fresh external firewire HD with nothing on it (clean out of the box) but it doesn't seem to help.
    Brian: I tried the no network suggestion a few months back but I'm not sure if I got it right. At the moment I have broadband through an external speedtouch usb modem and am also connected (occasionally although not for the last 3 months) via a crossover cable to my PCs ethernet card. When I last tried the No Network solution I had immense trouble getting my internet to work again! Can you please help me by directing me to the best ay to do this while protecting my internet settings?
    any more help guys would be greatfully appreciated.

  • Need help with Java applet, might need NetBeans URL

    I posted the below question. It was never answered, only I was told to post to the NetBeans help forum. Yet I don't see any such forum on this site. Can someone tell me where the NetBeans help forum is located (URL).
    Here is my original question:
    I have some Java source code from a book that I want to compile. The name of the file is HashTest.java. In order to compile and run this Java program I created a project in the NetBeans IDE named javaapplication16, and I created a class named HashTest. Once the project was created, I cut and pasted the below source code into my java file that was default created for HashTest.java.
    Now I can compile and build the project with no errors, but when I try and run it, I get a dialog box that says the following below (Ignore the [...])
    [..................Dialog Box......................................]
    Hash Test class wasn't found in JavaApplication16 project
    Select the main class:
    <No main classes found>
    [..................Dialog Box......................................]
    Does anyone know what the problem is here? Why won't the project run?
    // Here is the source code: *****************************************************************************************************
    import java.applet.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import java.util.*;
    public class HashTest extends Applet implements ItemListener
    // public static void main(String[] args) {
    // Hashtable to add tile images
    private Hashtable imageTable;
    // a Choice of the various tile images
    private Choice selections;
    // assume tiles will have the same width and height; this represents
    // both a tile's width and height
    private int imageSize;
    // filename description of our images
    private final String[] filenames = { "cement.gif", "dirt.gif", "grass.gif",
    "pebbles.gif", "stone.gif", "water.gif" };
    // initializes the Applet
    public void init()
    int n = filenames.length;
    // create a new Hashtable with n members
    imageTable = new Hashtable(n);
    // create the Choice
    selections = new Choice();
    // create a Panel to add our choice at the bottom of the window
    Panel p = new Panel();
    p.add(selections, BorderLayout.SOUTH);
    p.setBackground(Color.RED);
    // add the Choice to the applet and register the ItemListener
    setLayout(new BorderLayout());
    add(p, BorderLayout.SOUTH);
    selections.addItemListener(this);
    // allocate memory for the images and load 'em in
    for(int i = 0; i < n; i++)
    Image img = getImage(getCodeBase(), filenames);
    while(img.getWidth(this) < 0);
    // add the image to the Hashtable and the Choice
    imageTable.put(filenames[i], img);
    selections.add(filenames[i]);
    // set the imageSize field
    if(i == 0)
    imageSize = img.getWidth(this);
    } // init
    // tiles the currently selected tile image within the Applet
    public void paint(Graphics g)
    // cast the sent Graphics context to get a usable Graphics2D object
    Graphics2D g2d = (Graphics2D)g;
    // save the Applet's width and height
    int width = getSize().width;
    int height = getSize().height;
    // create an AffineTransform to place tile images
    AffineTransform at = new AffineTransform();
    // get the currently selected tile image
    Image currImage = (Image)imageTable.get(selections.getSelectedItem());
    // tile the image throughout the Applet
    int y = 0;
    while(y < height)
    int x = 0;
    while(x < width)
    at.setToTranslation(x, y);
    // draw the image
    g2d.drawImage(currImage, at, this);
    x += imageSize;
    y += imageSize;
    } // paint
    // called when the tile image Choice is changed
    public void itemStateChanged(ItemEvent e)
    // our drop box has changed-- redraw the scene
    repaint();
    } // HashTest

    BigDaddyLoveHandles wrote:
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    That wasn't attention-grabbing enough apparantly. Let's try it again.
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}
    h1. {color:red}MULTIPOST: [http://forums.sun.com/thread.jspa?threadID=5358840&messageID=10564025]{color}

  • Need help with advanced applet

    I need help with designing an applet as follows. Can someone give me a basic layout of code and material so i can fill in the rest or at leats give me some hints so i can get started since i am like no good at applets.
    Design and implement an applet that graphically displays the processing
    of a selection sort. Use bars of various heights to represent
    the values being sorted. Display the set of bars after each swap. Put
    a delay in the processing of the sort to give the human observer a
    chance to see how the order of the values changes.
    heres a website that does something similar
    http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html

    elasolova wrote:
    i will not help you this time. but if you buy me a candy maybe i can reconsider the issue. :PI suggest an all-day sucker.

  • NEED HELP about file handling and searching

    Hi guys !!!!!!!!!!!!!!
    A) I need a help from u i wrote this programme to read from the file and assign the lines for the string array.
    import java.io.*;
    public class ReadFile{
    public static void main(String[] args){
    int i;
    BufferedReader file;
    String line() = null;
    String fileName = "xx.txt";
              try {
                   file = new BufferedReader(new FileReader(fileName));
    for(i=1;i<=10;i++){
    line(i)= file.readLine();
    System.out.println(line(i));
    file.close();
              } catch (FileNotFoundException e) {
                   System.out.println("File: " + fileName + " not found.");
              } catch(IOException e) {
                   System.out.println("Error reading data from file: " + fileName);
    the thing is it is compiling but when interpritting it gives the error
    Exception in thread "main" java.lang.NullPointerException in line(i)= file.readLine();
    plese help me on this and
    B) i want to know how to search the string array to find 4 letter words.
    i'm taking the each element which is line(i) one at a time and search it.
    Plese help me on these issues !!!!!!!!!!!!!!!!!!!!!

    You try to create an array with line(i) (as far as i see) but you dont need to keep each line in memory. As far as i understand you just need to process lines sequentially.. (Null pointer exception is thrown because you did not create your array properly!)
    Look at this code:
    http://www.java-tips.org/java-se-tips/java.io/reading-text-from-a-file.html
    You just need to define process method in that code. (and of course try to understand). So as far as i see, you will check for 4-letter words inside process method!
    For detecting 4-character word, you need to extract the words in the line using StringTokenizer:
    http://www.java-tips.org/java-se-tips/java.util/how-to-use-stringtokenizer.html
    Then you can just just use length() method of String class:
    http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html
    And if you need more advanced logic for processing the lines(currently seems to be the length of strings), you may try regular expressions:
    http://java.sun.com/docs/books/tutorial/essential/regex/index.html
    http://www.java-tips.org/java-se-tips/java.util.regex/

Maybe you are looking for