3,927 Posted Topics
Re: This is a duplicate of the following question: [url]http://www.daniweb.com/forums/post1458941.html#post1458941[/url] Please direct any further discussion to that thread. Closing this one. | |
Re: Perhaps you should offer your own thoughts on your quiz questions as a starting point? | |
Re: Can you elaborate a little more on the question? All object creation is done through constructors. If no constructor is specified, the compiler will supply a default empty constructor that basically does nothing. If you wish to provide info that initializes some values in the object when it's created, you … | |
Re: Unfortunately it is a reality of the internet that you cannot always "undo" what you decide to share on it. The posts in question have already been public information for over 8 months. | |
Re: Here is a small tutorial on transparency using the AlphaComposite class: [url]http://javaboutique.internet.com/tutorials/Java2D/page04.html[/url] | |
Re: Define your mouse listener to accept a Mine reference in it's constructor and give it the mine object reference when you add the listener to the button[CODE]class MineListener extends MouseAdapter { Mine mine; public MineListener(Mine mine) { this.mine = mine; } @Override public void mouseClicked(MouseEvent e) { // do whatever … | |
Re: From what I can tell, we don't really have much expertise in the Game Development section to draw upon. Matt Evans used to provide a lot of good answers in there, but lately it looks pretty dead. | |
Re: Moving to Mobile Dev, perhaps some in there would have suggestions. | |
Re: [B]> which i found in some book[/B] That book being your course book and the problem being homework. Why not just say that? | |
Re: > try list.length() Why would she want to try a method that doesn't exist? That doesn't seem very useful to me. | |
Re: Here's an implementation of the rectangle click and drag. Determining what is within the box is up to you.[CODE]import java.awt.BorderLayout; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import javax.swing.JPanel; public class SelectionDemo extends javax.swing.JFrame { public SelectionDemo() { initComponents(); add(new DrawingPanel(),BorderLayout.CENTER); setSize(500,500); } … | |
Re: So now it's a pharmacy? What about your previous thread(s) about creating a database for a dentist office? Please make up your mind and quit wasting peoples' time begging them to hand you a complete design for a project database. | |
Re: You could read the help files or perhaps take a look through this screencast: [url]http://netbeans.org/kb/docs/java/java-editor-screencast.html[/url] | |
Re: [B]>Is there any symbol like && || ..?[/B] No, there isn't any special symbol or keyword. You have to check both bounds[code](x>=10 && x<=100)[/code] | |
Re: Yes, you could easily use XML to store the information about the currently open pictures/labels. JDOM is a very easy to work with DOM parser, which you can use to work with the XML doc. Your doc structure could be as simple as [code=text]<panel x='10' y='35 name='Whatever' />[/code]or as complex … | |
Re: Why are you asking people to explain how to make your database before you take your class? Isn't that why you are taking the class at all? Come back when you can demonstrate the slightest bit of effort on this and an initial idea of the design. | |
Re: You need to create a small class for your monsters that keeps track of their coordinates and bounding areas. A start would be something similar to this[CODE]class Monster { int x; int y; int width; int height; // of course, a Rectangle could be stored instead and it would save … | |
Re: Have you added the Java3D jar file(s) to your project class path? | |
Re: You're going to need to expand on "just a huge mess". Post specific questions, error messages and stack traces, etc. | |
Re: If the "Main-Class" attribute is specified in the jar manifest, then you shouldn't have any trouble double-clicking it to run. | |
Re: [CODE]for (File file : fileList){ System.out.println(file.getName()); }[/CODE]As for your second question, you can do anything you want with the list of files. It's just a collection of file references. | |
Re: You would need to move your PlottingPanel variable out of the constructor and up to class level. You can add a method like setPlot() to PlottingPanel to indicate which function is to be drawn and your painting method will need reference whatever info you set to know which function to … | |
Re: [QUOTE]i think he heard the first time[/QUOTE] Server has been hiccuping and causing multiple posts. I doubt he meant to post it three times :) | |
Re: Did you have some point in posting this other than demonstrating that you cannot properly use BB code tags? Some question perhaps or an error message? | |
Re: No, there isn't a build-in mechanism for that. You will need to get the list of files in the directory with list() or [URL="http://download.oracle.com/javase/6/docs/api/java/io/File.html#listFiles()"]listFiles()[/URL] and then check [url=http://download.oracle.com/javase/6/docs/api/java/io/File.html#lastModified()]lastModified()[/url] on them to determine the most recent. | |
Re: [B]>Could someone please give me any idea on how to add a background image to JInternalFrame without subclassing. [/B] Not really. You'll need to create your own subclass if you want to be able to add a method like that. You can't add methods though anonymous declarations like you have … | |
Re: He means that you have to save the state somehow. These easiest way to do that is to [URL="http://www.exampledepot.com/egs/java.io/WriteToFile.html"]write to[/URL] and [URL="http://www.exampledepot.com/egs/java.io/ReadLinesFromFile.html"]read from[/URL] a file. | |
Re: I think you should program a network filter that sends all "need a project" traffic to a null device. | |
![]() | Re: Either Java or C# would be a good start. Both are widely in use right now. |
![]() | Re: Post what you have started with. Ask specific questions. Demonstrate that you have made some effort at this yourself if you expect others to take their time to help you. |
Re: Yes, it will have to be signed. [url]http://download.oracle.com/javase/tutorial/deployment/applet/security.html[/url] | |
Re: Well, yes, calling drawGraphics() won't do anything because it's an empty method. | |
Re: Yes, moving this to social media forum. | |
Re: Ant has a built-in [URL="http://ant.apache.org/manual/Tasks/zip.html"]zip[/URL] task that you could use, but if you want to use 7z instead then I would think you could do it pretty easily with [URL="http://ant.apache.org/manual/Tasks/exec.html"]exec[/URL]. | |
Re: Just use a JLabel that spans the bottom of your frame or a panel with multiple labels if want several fields of info. | |
Re: @vincentjohn: That is just ridiculous. Please read up on the JVM and modern just-in-time compilers before you start tossing around nonsense like that. The OP did not even supply enough information to begin to know why it is "slower" and how he can load his panes "fastly". My guess would … ![]() | |
Re: You have a typo in the command string. Take the space out of "/ c" in "cmd / c start https://google.com" | |
Re: What's wrong with just using [code]double memory;[/code]All you have to do is store a number and that's all a variable does. | |
Re: Take a look at the [URL="http://download.oracle.com/javase/tutorial/uiswing/components/icon.html#getresource"]How To Use Icons[/URL] tutorial. It addresses that issue. | |
Re: You need to update the model, not the JTable. [url]http://www.exampledepot.com/egs/javax.swing.table/InsertRow.html[/url] [url]http://download.oracle.com/javase/tutorial/uiswing/components/table.html#data[/url] | |
Re: [quote=TransKim;465166]Hi members,I would like to share knowlege in Java with you. I have a problem which i request a solution for. I want to design a GUI in java that displays four roads each having traffic lights and these traffic lights have four colours(green, orange, and Red). So I want … | |
Re: Please read our forum rules about showing effort if you expect help with homework. Also, do not use "chat speak". I'm sure you can manage to type all of the letters of the words. | |
Re: Use a different layout such as BorderLayout, BoxLayout, or GridLayout. [URL="http://download.oracle.com/javase/tutorial/uiswing/layout/index.html"]Lesson: Laying Out Components Within a Container[/URL] | |
Re: If you use Shape objects for rendering, you can use their [URL="http://download.oracle.com/javase/7/docs/api/java/awt/Shape.html#contains(double,%20double)"]contains()[/URL] method to determine if they are under the mouse. So if you created an [URL="http://download.oracle.com/javase/7/docs/api/java/awt/geom/Ellipse2D.html"]Ellipse2D[/URL] for your ball and used [URL="http://download.oracle.com/javase/7/docs/api/java/awt/Graphics2D.html#draw(java.awt.Shape)"]draw(Shape)[/URL] to draw it, you could later determine when it is clicked on with a mouse listener and … | |
Re: You could start with [URL="http://www.exampledepot.com/egs/java.awt.image/Mandelbrot2.html"]this example[/URL]. | |
Re: Executable jar files need a [icode]Main-Class: [/icode] entry in the manifest file. More info here: [url]http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html[/url] | |
Re: You could use an EmptyCell object that renders itself in different colors under certain conditions, such as one color for mouse-over and another for "selected". | |
Re: Do not use "=" or "!=" to compare strings. Use the string function equals() or equalsIgnoreCase(). | |
Re: He could just as easily extend JPanel and plug those into whatever top-level frames he wants to use for the OS. |
The End.