3,927 Posted Topics
Re: [QUOTE=mugdha_2005;779635]hey can u send me the soft copy of the seminar on teleimmersion??[/QUOTE] Because you are genuinely interested in his views on the subject or because you are such a pathetic student that you cannot complete your own assignments? Just curious. Hopefully it's the former. If it's the latter, please … | |
Re: You didn't post any code, so I can't speak directly to your current structure, but you should be able to do all that in your current animation loop. If your paint method were to operate on a List of car objects, your animation loop can simply update/create/remove car objects in … | |
Re: Java WebStart might be an option for you: [url]http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/faq.html[/url] [url]http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/contents.html[/url] | |
Re: Well, those look like XML tags, so an XML parser is one possibility. The regex package is another. [url]http://java.sun.com/docs/books/tutorial/essential/regex/index.html[/url] If the text is simple enough, the methods on the [URL="http://java.sun.com/javase/6/docs/api/java/lang/String.html"]String[/URL] class itself, such as indexOf(), will probably suffice. | |
Re: Just to provide a little more explanation why that works and why you had the previous difficulties, you were executing your animation loop code that slept and called repaint() on the event dispatch thread - which is the same thread that is responsible for processing those repaint() calls you were … | |
Re: And did your friend also let you know that help is only offered to those who demonstrate some effort, as stated in the community rules and many announcement threads scattered throughout the forums? Post what you have so far or at least some specific questions related to the areas that … | |
Re: Try these: [url]http://java.sun.com/developer/onlineTraining/JavaIntro/exercises.html[/url] (which was the fourth result of a Google search on "simple java exercises" - think about that) | |
Re: Those are things determined by the OS. Windows display the icon of the file type association. Altering any of those would require Windows-specific code to alter the registry for that association. Java itself does not get involved with those things. | |
Re: Drop the [] from "A[]" in this portion [icode]array_sum(A[],first,last-1)[/icode], you only need those in the declaration, not when using the variable. The array itself is merely "A". | |
Re: Ok, some hints. 1) In your constructor, don't re-declare "storage", just initialize it. You have already declared it at the class level. 2) In your addCircle method, you want to add that new Circle object to your storage list, so look at the methods on ArrayList for adding things. 3) … | |
Re: Which do you think you should choose? Why do you think so? Have you been paying attention in class at all? If so, you should be able to formulate some more specific questions to ask here. | |
Re: Here is the main problem[code]public void dieTest(){[/code]Constructors don't specify a return type. What you wrote there is a method, not a constructor. Drop the "void" and you're good to go. | |
Re: masijade means that the TextField variables themselves might be null, as in you have not initialized them with "new TextField()". He wasn't referring to them being empty. The code you posted above doesn't really answer that question, because you didn't post the addField() method code. | |
Re: Maybe his professor will give you credit for it. devonte15, what is the professor's email address, so Vernon can turn in the assignment? | |
Re: You only need to return a single value from that method: the value the user selected from the menu. | |
Re: Ok, two things: 1) Load the Image through an ImageIcon[code=java]img = new ImageIcon("gifTest2.gif").getImage() ;[/code]ImageIO.read() returns a BufferedImage, which doesn't update the ImageObserver. I couldn't tell you the exact reason why because I don't really mess with images much, but perhaps an animated gif needs a VolatileImage instead of the BufferedImage … | |
Re: [icode]System.getProperty("user.home")[/icode]will give you the users home directory. | |
Re: You don't need JUnit at this point, you just need to place some debugging println statements throughout your methods so you can see what is going on inside them (if you don't have or know how to use an IDE debugger). Trying to learn how to use JUnit is not … | |
Re: So use [ICODE]String.valueOf(int).[/ICODE] | |
Re: You need to add the scroll pane to your container instead of the text area. Change this[code]container.add(textArea);[/code]to this[code]container.add(sp);[/code] | |
Re: It really just depends on where and how that class is used. For a tiny private data struct? I'd leave em public. For something that will be used by others, probably best to add accessors. You can read Josh Bloch's thoughts on the matter here if you're inclined: [url]http://books.google.com/books?id=ka2VUBqHiWkC&pg=PA71&lpg=PA71&dq=java+public+fields+on+small+data+classes+bloch&source=bl&ots=yXFkJkt1OX&sig=PzH5Fo9XfOcs4P2AZScOHjji-bw[/url] | |
Re: Take a look at the [URL="http://java.sun.com/products/java-media/jmf/"]Java Media Framework[/URL]. Some of the demo solutions here [url]http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html[/url] may be useful. | |
Re: Is that babble supposed to make any sense at all? | |
| |
Re: [QUOTE=Lamar Cole;803436]Just as a stapler will bind paper, love will bind people.[/QUOTE] A stapler will bind people too, if it's big enough. | |
Re: A more generalized Theater class design would have either a single collection of seats with the section, price, etc being properties of the seats, or another intermediate collection class to represent seating sections that contained their own collections of seats. Theaters do not all share common layouts or number of … | |
Re: This would do it[code]int total = 399; System.out.printf("\u00a3%1$d.%2$dp%n", total/100, total%100);[/code] | |
Re: Which was most likely found with a simple Google search: [url]http://www.google.com/search?sourceid=mozclient&ie=utf-8&oe=utf-8&q=java+ldap[/url] Please take some initiative to search a little on your own before posting questions of this nature. | |
Re: "Global" is not the same as instance level scoping. Careful about using those terms interchangeably. Scoping issue aside, I have to wonder why you nine different unrelated arrays to hold the properties of what should probably be a one dimensional array of objects that contain that data? | |
Re: Have you designed classes to represent those Swing controls? Have you read the Sun tutorial on drag and drop yet? | |
Re: You may want to read through this section of the Sun tutorials: [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html#getresource"]Loading Images Using getResource[/URL]. | |
Re: [QUOTE=MidiMagic;806329]I'm sick of these rules blah blah... Another problem is that different BBSs have different sets of rules blah blah[/QUOTE] Well, yes, distinct cultures have their own varying ideas on what is and is not acceptable interaction. Not really a new thing - ask any sociologist. Get over it or … | |
Re: @notuserfriendly: What you posted really has nothing to do with OOP. And the purpose of OOP is to manage organizational and behavioral complexity in code design - not "learning easier". You may want to do a bit more reading on the subject: [url]http://en.wikipedia.org/wiki/Object-oriented_programming[/url] | |
Re: You've probably missed a type designation on a variable or parameter somewhere above that code then, because there is nothing wrong with those two lines. Which line specifically is indicated as the cause? | |
Re: You would want the line numbers to be a separate component along the side of the page, not part of the text in your JTextArea. | |
Re: [code]<html>Name1<br> Grade1<br> Name2<br> Grade2</html>[/code] | |
Re: You should probably explain what it is doing wrong, what you expect it to do, and any errors you receive, rather than expecting people here to pick through it and play "find the problem with this". | |
Re: I'm going to chime in and agree with the -1 return. I had assumed you were already doing what s.o.s. mentions above about returning the index of the element. That is the way many such methods operate in the standard JDK classes. Sticking to the common idioms for things like … | |
Re: [ICODE]table[tr/td/b/font='Nohup Files'][/ICODE] seems to work for getting the table element, if that's what you are wanting. I tried it out with the following structure[code]<root> <table> <tr><td><b><font>Not this one</font></b></td></tr> </table> <table> <tr><td><b><font>Nohup Files</font></b></td></tr> </table> <table> <tr><td><b><font>Other</font></b></td></tr> </table> </root>[/code] | |
Re: Read the API doc on the Scanner class. It can read from a file just as easily as it can from System.in. | |
Re: >Also, does anyone know how to add to an existing file, not just write over it? There is another [URL="http://java.sun.com/javase/6/docs/api/java/io/FileOutputStream.html#FileOutputStream(java.io.File,%20boolean)"]constructor for FileOutputStream that allows you to specify append[/URL]. | |
Re: You can use getWidth() and getHeight() for those parameters. | |
Re: Maybe some of the code samples here will help: [url]http://www.java2s.com/Tutorial/VB/0300__2D-Graphics/Catalog0300__2D-Graphics.htm[/url] | |
Re: Well, you commented out the line that would have read the name data, so you're going to need to put that back in or skip ahead in your input stream somehow. Since you're using some third-party TextReader class, we can't really offer much advice on using that specifically. Edit: I … | |
Re: This should get you started: [URL="http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html"]How to Use Actions[/URL] | |
Re: After 61 posts here, you should be well aware that "chat-speak" or "IM-speak" is discouraged in the forum rules. Are you really too lazy to type out all of the letters and use punctuation where appropriate? Should anyone else spend their time to help someone who doesn't care enough to … | |
Re: Any code posted should be placed between [noparse][code] [/code][/noparse] tags so that formatting and indentation is preserved. Please ask specific questions. "Can someone help me finish writing the code so that this program will work?" is not a specific question. No one wants to complete your homework just for the … | |
Re: You can use the [URL="http://java.sun.com/javase/6/docs/api/java/util/Scanner.html"]Scanner[/URL] to read from files as well. Take a look at the documention. | |
Re: Sounds like a problem with the database itself or the JDBC driver implementation. | |
Re: This is elementary language syntax that you could easily search out yourself. [url]http://letmegooglethatforyou.com/?q=java+final+static[/url] |
The End.