200 Posted Topics
Re: [quote]a general CS degree can benefit you more than a game programming degree as you work your way into the field[/quote] i was told that too, so that is what i am doing when i enter college this fall :) | |
Re: depends on the complexity of what kind of equations you want to be able to supply to it. just addition and subtraction won't be too difficult for you, but if you want it to have MDAS then it will be slightly more complex, and PEMDAS is even more compex... i … | |
| |
Hypothetically, say i want to know how may times anyone has clicked a button in an applet. NOTE: this is not what i actually want to do but it is a good example. more specifically i have a text file in a jar, along with classes, called clicks.txt. every time … | |
Re: you could write your own XML parser with SAX or DOM, i'm not sure but i think DOM is the one that allows XSD, but i haven't messed around with it much :( hope it helps :) | |
Re: for some reason your paintCompant() isn't working for your JFrame, remove Component form the method declaration, and you [B]need to call[/B] [icode]repaint()[/icode] from you actionPerformed() method | |
Re: this thread is two years old, why not post in another topic? many people also frown upon thread hijacking | |
Re: i learned by reading the tutorials at [url]http://www.htmlgoodies.com[/url] | |
Re: first, you should use setVisble(true) instead of show() second your objective is unclear, could you elaborate? | |
Re: [QUOTE=masijade;658170]It was suppossed to be "event" thread. And if you don't know what it is, then I can [i]guarantee[/i] you're doing it. Post your code.[/QUOTE] he said he's running it in a new thread so he probably isn't doing in the event thread still post your code | |
Re: uh, that's javascript not java. the correct forum for that is [URL="http://www.daniweb.com/forums/forum117.html"]here[/URL]. | |
Re: i don't know any off the top of my head, if noone can find an answer you may have to write something yourself sorry for my lack of useful info a quick search i found [URL="http://www.a7soft.com/jexamxml.html"]this link[/URL] but i didn't look at it at all | |
Re: please use code tags. to find the max of three i would use [ICODE]Math.max(double,double)[/ICODE] to find the max of two numbers then do another to find the max of the third number and the max of the first two. i wrote this method that will take any amount of doubles … | |
Re: [QUOTE=~s.o.s~;650988]Maybe a common interface like Moveable should do the trick here. [/QUOTE] i was going to suggest interfaces too, i think moveable is a good idea. i was going to suggest GamePiece as an interface with a method such as isValidMove(x,y), and maybe isAlive() and some others. | |
Re: nothing is appearing on the screen because you are not overriding [icode]paint(Graphics)[/icode], if you want to draw stuff on a JComponent you [B]must[/B] override [ICODE]paint(Graphics)[/ICODE], and then when you want to change something you need to call [ICODE]repaint()[/ICODE]. [CODE=java]public class DrawComponent extends JComponent{ public void paint(Graphics g){ //DRAW STUFF HERE … | |
Re: [QUOTE=Jaulm;650762] [code] PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("firstlog.txt", true))); out.print("this is a message to first log.txt"); out.close(); [/code][/QUOTE] well, you would use a(n)( series of) if statement(s) and put your print statements in it/them, all you really need to write to more than one file is more … | |
Re: i used to use netbeans, it was pretty easy, but there were a few things it wouldn't do, but it was very project specific (now i write my GUI by hand coding) | |
Re: no it doesn't, just keep putting in numbers and pressing enter, it works fine. what problem are you having? | |
Re: ran fine for me, i made one change so i could run it from Bluej i left it all in one file, but i made FGInventory public, and it didn't throw any errors when i ran main() | |
Re: why not use a [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html"]JProgressBar[/URL](sun tutorial link) | |
Re: if you have to use a Shape i would go with a [URL="http://java.sun.com/javase/6/docs/api/java/awt/geom/CubicCurve2D.html"]CubicCurve2D[/URL] the sun tutorial that covers these is [URL="http://java.sun.com/docs/books/tutorial/2d/geometry/primitives.html"]here[/URL] to get one period of a sin or cos wave you need two of these if not explain what you need to do in more detail | |
Re: i don't have any of those moments from this site, but looking at past projects, i definitely do. even now i still make a ton of projects called <NAME>Test, or <NAME>try, where name is some type of concept or feature of the API i'm testing or trying to figure out, … | |
Re: [QUOTE]So, are there any online tutorials specifically for 1.5 version[/QUOTE] 1.5? i have 1.6 and all of the sun tutorials work fine for me, i believe that Sun keeps the JDK's backwards compatible, although you may get warnings of depreciations or "unsafe operations", usually meaning casting from a list of … | |
Re: [QUOTE]- Of Python, Scheme, and Perl, pick the one you liked the least.[/QUOTE] out of curiosity why the one you like the least? | |
Re: help with what? what problems are you having exactly? | |
Re: i know this is an old thread, but in my wanderings of the web i found [URL="http://norvig.com/java-iaq.html"]Java Infrequently Answered questions, [/URL] which has exactly the answer to this question it's down the page a ways | |
Re: [QUOTE=Ezzaral;643928]No, it all relies on machine instructions, as does C++ itself. Sure you can: [url]http://www.google.com/search?sourceid=mozclient&ie=utf-8&oe=utf-8&q=java+to+exe[/url] But you give up platform portability and may lose out on JVM/JIT improvements down the road. You [u]can[/u] do it, it's just not a good idea for most cases. [/QUOTE] actually, i heard, and read … | |
Re: i cannot find a simple answer to that anywhere, i too use bluej, the only way that i see is to actually make an extension for bluej with the [URL="http://www.bluej.org/doc/extensionsAPI/bluej/extensions/event/CompileEvent.html"]CompileEvent[/URL] used somewhere, i don't write bluej extensions nor do i know how, but if you do then i think it … | |
are there any good (comprehensive) tutorials that anyone knows of for the SAX parser? i cannot find a good one | |
Re: thinking about how i would do this recursively, a number to a power, is the same as the number times the number to the power-1, until the power is zero, if it is zero the exponentiation is always 1, no matter the number, granted this approach only does work if … | |
Re: in dev-cpp with your project open, go to Project->Project Options go to the parameters tab under linker type [icode]-lalleg[/icode] hope this helps | |
Re: all java variables are references, but in the future please search the forums [url]http://www.daniweb.com/forums/showthread.php?t=113985&highlight=pointers[/url] [url]http://www.daniweb.com/forums/showthread.php?t=119308&highlight=pointers[/url] [url]http://www.daniweb.com/forums/search3910597.html[/url] | |
Re: which lines are confusing you? if this is starter code, they have given you a lot, but no one can explain the lines you need if the don't know which ones they are. | |
is there a method in the mouse listeners or any other event handlers that utilizes the tilt wheel, either tilt or scroll, i can't find anything edit: found scrolling no tilt yet | |
Re: Did you navigate to the directory in command prompt? [icode]cd c:\DIRECTORY\blabla...Add.java[/icode] or [icode]cd DIRECTORY_IN_CURRENT_DIRECTORY[/icode] and then [icode]javac Add.java[/icode] | |
i am getting strange results and cannot figure out why: Vel CONTROL (the vector 1,0), and Acc are Vec2D objects, which has X and Y values, and methods such as add, angle between, and other such vector util particle extends ellipse2d.double updateSuper() simply changes the values for it OLine extends … | |
Re: [quote][code] int x=(int)(Math.random()*6); int y=(int)(Math.random()*6); int roll = x+y; for (int i = 1; i<=10000; i++) if (roll == 7 || roll == 11) numWins = numWins +1; else if (roll==2 || roll==3 || roll==12) numLosses = numLosses + 1; else { x=(int)(Math.random()*6); y=(int)(Math.random()*6); } int point = x+y; while … | |
Re: this: [quote] JOptionPane.showMessageDialog(null, ("Student Name: " + studentName), ("\nScores: " + studentScores[i] + " "), ("\nAverage: " + average), ("\nHigh Score: " + studentHighScore), ("\nLetter Grade: " + studentLetter)); [/quote] showMessageDialog(null,string,string,string,string,string) should be [icode]showMessageDialog(null,string text,string title,int,icon)[/icode] or much more simply [icode]showMessageDialog(null,string text)[/icode] i believe that you are trying to concatenate … | |
Re: i think masijade is write, but if it is before that time you click the edit button that is usually around the quote button at the bottom of the post. also for future reference i don't think the "Java" board is the place to ask that kind of question | |
simple questions, hopefully simple answers: How do i give a JButton the capability to accept a right click? When a JButton is being clicked it changes to a darker color, is there a way to make it a completely different color? i cannot find these answers in the API or … | |
hello, i'm making a small calculator program, and i want the display to look like this: [URL="http://www.freewebs.com/sciwizehgames/images/want.jpg"]want.jpg[/URL] but i'm getting this: [URL="http://www.freewebs.com/sciwizehgames/images/Getting.jpg"]getting.jpg[/URL] this is the code i am currently using for the task: [CODE]public void actionPerformed(ActionEvent e){ String currText = viewer.getText(); String text = enter.getText(); int len = currText.length(); enter.setText(""); … | |
Re: the last post of [URL="http://www.daniweb.com/forums/thread128116.html"]this thread [/URL]has the answer that will evaluate mathematical expressions i found it in a book | |
my secondary project at the moment is a complex calculator program, a graphing calculator, actually. i want to write a parser for it by hand, as it needs to do very specific complex stuff, but i cant find anything on writing a parser. i have a start, it will split … | |
Re: it compiled fine for me... what are you using to compile it? what IDE, if any? | |
Re: three problems: 1) your asking us to do your assignment for you 2) even if you have done most of the work, some people cannot open .rar files (like me) so wont be able to see it 3) you don't specify why you can't finish the assignment yourself, what is … | |
Re: netbeans has auto-complete, granted a little slow. it now also has UML development. and the wysiwyg (what you see is what you get) swing is a plus, but not useful for everything. i use bluej, mostly because my school does at the moment, and i like the code panel. IDE's … | |
Re: Are you referring to lego mindstorms? you mentioned brickos which is specifically designed for them. if so you want [URL="http://lejos.sourceforge.net/"]LeJOS[/URL] | |
Re: i personally use bluej and have had no problems with it, and i really enjoy the code window, the only complaint i have with it is no code completion otherwise i like it a lot | |
Re: my first post! sorry to post in an old thread, but i have a question related to this. my situation is this: i want to make a paint-like program for a project in class, with "quick select colors," an array of colors, and an array of buttons (with only background … |
The End.