1,034 Posted Topics
Re: If you want to get each item seperate, you will need to use a StringTokenizer. While looping, you could take the read line and tokenize it: [Code] ArrayList first = new ArrayList(); ArrayList second = new ArrayList(); ArrayList third = new ArrayList(); ArrayList fourth = new ArrayList(); int count = … | |
Re: Are you using the BlackBerry java sdk? That would be the start. I've never used it so I can't help you with the methods, but I do know the api methods you will be using are different. I'll look around and see if I can't find anything. | |
Re: I use the google german version, and normally it will say this at the side of a link that is not in german: [ Diese Seite übersetzen ] that means translate this site. I don't have the english version, but I'm guessing if you reach a site that's not in … | |
I was wondering if someone could point me to some good online tutorials and exercises. I most importantly would like a site with some exercises to help me learn further. I have a book called "JavaScript in 24 hours" and I have to admit, this book is terrible. It teaches … | |
Re: This is your problem, you only have one instance of a scrollbar. You'll need to have 3 of them, and fix the handleevent so that it will check to see which one was fired. | |
Re: I don't understand you people about the number of casaulties in this war. If you think it's so high, then grab a book and or goto one of your one sided websites and look at the numbers from the past...Compared to the past this is one of the most succesful … | |
Re: You have an older version that's why. try this; [Code] public static void main(final String[] args) { JFrame frame = new JFrame("Drawing"); frame.getContentPane().setLayout(new FlowLayout()); frame.setSize(300,300); Drawing drawing = new Drawing(); Drawing drawing1 = new Drawing(); frame.getContentPane().add(drawing); frame..getContentPane().add(drawing1); frame.setVisible(true); frame.repaint(); } [/Code] | |
Re: How about a project that will randomly choose ideas for people like you. I find it amazing you're in college and can't think of anything. | |
Re: I don't think there is a "pretty" way of doing this. You could create a flag in the servlet context object(using a session listener, i think), or you could somehow use a cookie(stupid idea). I'm guessing the session listener would be the way to go. | |
Re: Process p = Runtime.getRuntime().exec(cmdline); You can get an inputstream from that and read it if that's what your heading towards. | |
Re: [Code] for(int i=0; i<pricesArray.length-1;i++) { double value = Double.valueOf(pricesArray[i]).doubleValue(); sum = value + sum; } [/Code] Your for loop is missing one of the elements. You can change it to this: [Code] for(int i=0; i[B]<[/B]pricesArray.length;i++) [/Code] Note: you don't have to worry about indexing out of bounds because it never … | |
I've created an html form that allows the user to login, or register. Here is what I've thought about(just for the registration page, not login): HTML FORM --> servlet ---> servlet calls java class that verifys the data, and shoves it into the database... ----> Makes a few tests --- … | |
First of all, I would like to say that this is NOT homework..I'm working on this in my on free time. Anyways, I'm needed someone to help me out in calculating some stuff with mortgages. I need to know how to do the following: 1) Calculate prepayments 2) Calculate inflation … | |
Re: At first it didn't open, but I tried again and it did. When it didn't open, I opened the java console and it gave this error message: [Code] java.lang.UnsupportedClassVersionError: HydraSWApplet2 (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:502) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:148) at sun.plugin.security.PluginClassLoader.findClass(PluginClassLoader.java:168) at java.lang.ClassLoader.loadClass(ClassLoader.java:299) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:114) at … | |
Re: Yep, the lawyers REALLY rip people off. Most people cannot afford them, so they say: "Hey, don't worry about paying me right now, but if we win, I get 50%". I think I saw on a television show about this crap a while back, and one lawyer made 900 million … | |
Could someone please tell me how to hyperlink to a page? Say if I had a combobox and the user selected an item, how could I hyperlink to a page? | |
Re: How exactly are you converting to unicode? This can cause problems if you accidently mess up in the range of values. | |
Re: I know of one way, but that still requires you to run it from the command prompt. After that, you can close the command line and it will still run: Try the javaw command: javaw ApplicationName That will start the program and then you can close the command prompt withought … | |
I have a "dynamic" JComboBox. What I mean by that is items are removed and added on "the fly". The getSelectedIndex() is returning -1 when an item is selected. I looked this up and it indicates the selected item is not in the list....What in the world does that mean? … | |
Re: Usually lilo plays nicer than grub when you want to dual boot with xp. | |
Re: [Code] public static void main(String[] args) { try { Player player = [B]Manager.createPlayer"http://localhost/sample.wav");[/B] player.start(); } catch (MediaException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } [/Code] could the problem be leaving out a parenthesis? [Code] public static void main(String[] args) { try { Player player = Manager.createPlayer("http://localhost/sample.wav"); … | |
Re: If you do an encryption type program, you'll probably spend more time reading up on it than writing code...So you might not have much to show for your work. Once you figure out the basics there's really not much code involved unless you do some really advanced encryption scheme, which … | |
Re: Well, you do have options. No one forces you to use Microsoft Word Perfect over Notepad. You can only do so much with software built for users looking for something simple. Complex software offers a wide range of flexibilty and use. The more complex the task, the more complex the … | |
Re: You don't have a "main" method to even run the program? Once you do, your program will work fine(I've already tried it). Add this method to your code: [Code] public static void main(String[] args) { Student s = new Student(); s.inputGrades(); System.out.println("Average --> " + s.getAverage()); System.out.println("Letter grade --> " … | |
Re: Will this ID always be in that format, or will the comma and such be in different places? | |
Re: Try using "getters" and "setteres": [Code] public class Block { private int[][] where; public Block(Stage s) { super(s); fillArray(4,4); } public void fillArray(int firstIndex, int secondIndex) { where = new int[firstIndex][secondIndex]; int x = 0; for (int i=0; i<firstIndex; i++) { for (int j=0; j<secondIndex; j++) { where[i][j] = x; … | |
Re: What about OEM release software? I've heard it's cheap but I can't say because I've never used it, nor do I know if it's easy to obtain. | |
Re: Looks great! One thing though, I do believe the colors need some changing. | |
Re: I've never done this before so I can't give any code, but I do know that you can use the javax.mail package. | |
Re: I'm guessing you have an HTML form that links to the servlet? If so, it's the actionform path that's wrong. Please post it. Actually, you're using tom 5.5...I had A LOT of problems with that and so has many other people. Even after getting the DD correct and the path … | |
Re: :evil: :evil: :evil: I just wasted almost 8.5 hours at the "wonderful world of walt disney"(WHAT A MISLEADING TITLE). Unless your 3 years old, DO NOT make the mistake in going there!!!! Take my advise! | |
Re: [QUOTE=Shackbase] A minute later, in full view, a killer whale ate them both. [/QUOTE] :lol: :lol: :lol: :lol: I like that one. | |
Re: There's no way of getting around the files created from inner/sub/external classes. Splitting up into classes like you've done is good. It's better OO design to split the functionality into different classes. | |
Re: You're using System.out.println() with an applet...Not something you can do. You'll need to have a paint method and draw the string to the applet...Of course you could escape all of that by using JOptionPanes. | |
Re: You have to be careful when throwing exceptions in a constructor, that is if you want clean running code. Constructors should also return valid objects but sometimes can't due to errors. I guess the best way to deal with something of this senario is present clear error messages that let … | |
Re: Is this something that will be implanted in the skin? | |
Re: Your classpath is wrong. It should point to the tools.jar file in your jdk directory. When you do this MAKE SURE that you add a period to the end of tools.jar like so: tools.jar. | |
Re: Why don't you run the check disk utility and check the volume for errors. | |
Re: There's no doubt in my mind that he did molest chidren...But that means nothing. The prosecution was terrible in this case. NOT ONE of the witnesses were trustworthy. Each one kept changing their story.. First it was, yes he did it, then wait no he didn't. You can't convict someone … | |
Re: I believe all good nations have a religous foundation, and I don't care what other people say. The reason the United States is in Jeopardy is because it's morals(set by religion) are under attack. Regardless of wether your a believer or not, religion(specifically christian) creates good morals. Now, there is … | |
Re: You form action should probably be this: '/examples/servlet/sestrack' If it's anything else you need to set up your DD. Actually you need to add the servlet info anyway to the DD(if I remember corretly). If that still doesn't work then your probably using the latest version of tomcat. I never … | |
Re: If you bought redhat at 5$, then that's good. At one point they were up to 29$ but later fell. I belive they are currently hovering around the 10-15$ range...But for SunW, that probably wasn't a good choice! I've been watching that one and never really seen it do anything … | |
Re: Wouldn't you encrypt the password? How exactly does this program run? Is it an applet or a JFrame that the user has? For the update you could have a servlet that reads the password from the xml DD. I think it's the servlet context you would have to set onn … | |
Re: [QUOTE=JJ___]And please proof read your posts. Maybe I'm just a stickler for spelling, but last time I checked 'prtect' wasn't in the dictionary...[/QUOTE] :rolleyes: I think I remember a program or something called "Universal Shield". I know it blocked you from opening files that were protected by it, but I … | |
Re: There's really no other way than creating a new array each time. [Code] String[] original = new String[4]; String[] temp = new String[words.length+1]; original = temp; [/Code] I'm sure a performance hit would come out of that. |
The End.