3,927 Posted Topics

Member Avatar for lance7tour

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.

Member Avatar for Ezzaral
0
334
Member Avatar for Tamba Henry

Perhaps you should offer your own thoughts on your quiz questions as a starting point?

Member Avatar for KushMishra
0
52
Member Avatar for tinamary

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 …

Member Avatar for peter_budo
0
185
Member Avatar for dbphydb

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.

Member Avatar for happygeek
0
237
Member Avatar for sirlink99

Here is a small tutorial on transparency using the AlphaComposite class: [url]http://javaboutique.internet.com/tutorials/Java2D/page04.html[/url]

Member Avatar for sirlink99
0
86
Member Avatar for phouse512

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 …

Member Avatar for Ezzaral
0
1K
Member Avatar for WASDted

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.

Member Avatar for Nick Evan
0
108
Member Avatar for jimsym
Member Avatar for peter_budo
-1
88
Member Avatar for acash229

[B]> which i found in some book[/B] That book being your course book and the problem being homework. Why not just say that?

Member Avatar for acash229
0
159
Member Avatar for LianaN

> try list.length() Why would she want to try a method that doesn't exist? That doesn't seem very useful to me.

Member Avatar for LianaN
0
848
Member Avatar for LianaN

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); } …

Member Avatar for LianaN
0
2K
Member Avatar for javanew

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.

Member Avatar for debasisdas
0
180
Member Avatar for Sparky_

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]

Member Avatar for DarkLightning7
0
128
Member Avatar for Neversleepin

[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]

Member Avatar for Ezzaral
0
85
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
162
Member Avatar for javanew

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.

Member Avatar for Ezzaral
0
484
Member Avatar for javanoob101

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 …

Member Avatar for javanoob101
0
370
Member Avatar for nocookies92
Member Avatar for nocookies92
0
399
Member Avatar for saveme123

You're going to need to expand on "just a huge mess". Post specific questions, error messages and stack traces, etc.

Member Avatar for saveme123
0
203
Member Avatar for register86

If the "Main-Class" attribute is specified in the jar manifest, then you shouldn't have any trouble double-clicking it to run.

Member Avatar for kvprajapati
0
270
Member Avatar for Neversleepin

[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.

Member Avatar for Neversleepin
0
121
Member Avatar for hellotata

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 …

Member Avatar for hellotata
0
777
Member Avatar for pooran.c

[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 :)

Member Avatar for Ezzaral
0
129
Member Avatar for vsvivek796

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?

Member Avatar for Ancient Dragon
-2
126
Member Avatar for Neversleepin

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.

Member Avatar for Ezzaral
0
6K
Member Avatar for LianaN

[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 …

Member Avatar for LianaN
0
853
Member Avatar for hao90

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.

Member Avatar for JKP()
0
94
Member Avatar for anuradha85

I think you should program a network filter that sends all "need a project" traffic to a null device.

Member Avatar for Johnclave111
0
615
Member Avatar for Fjolsvidr

Either Java or C# would be a good start. Both are widely in use right now.

Member Avatar for nounnylee
0
119
Member Avatar for ovidiu_b13

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.

Member Avatar for JDCyrus
0
168
Member Avatar for mrnutty

Yes, it will have to be signed. [url]http://download.oracle.com/javase/tutorial/deployment/applet/security.html[/url]

Member Avatar for mrnutty
0
92
Member Avatar for HDRG
Member Avatar for Ezzaral
0
204
Member Avatar for traskdigital
Member Avatar for boshu

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].

Member Avatar for Ezzaral
0
211
Member Avatar for rohit2

Just use a JLabel that spans the bottom of your frame or a panel with multiple labels if want several fields of info.

Member Avatar for Ezzaral
0
72
Member Avatar for mani_1991

@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 …

Member Avatar for vjcagay
0
168
Member Avatar for Neversleepin

You have a typo in the command string. Take the space out of "/ c" in "cmd / c start https://google.com"

Member Avatar for Neversleepin
0
230
Member Avatar for hauda67

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.

Member Avatar for Ezzaral
0
215
Member Avatar for Statoeo

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.

Member Avatar for Statoeo
0
279
Member Avatar for kvass

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]

Member Avatar for Ezzaral
0
136
Member Avatar for TransKim

[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 …

Member Avatar for masijade
-2
221
Member Avatar for OjeeTa

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.

Member Avatar for Ezzaral
0
398
Member Avatar for sciprog1

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]

Member Avatar for sciprog1
0
97
Member Avatar for sciprog1

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 …

Member Avatar for sciprog1
0
134
Member Avatar for blueman:-0

You could start with [URL="http://www.exampledepot.com/egs/java.awt.image/Mandelbrot2.html"]this example[/URL].

Member Avatar for Ezzaral
0
64
Member Avatar for java1
Member Avatar for neutralfox

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]

Member Avatar for Marin88
0
2K
Member Avatar for sciprog1

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".

Member Avatar for sciprog1
0
93
Member Avatar for newtechie

Do not use "=" or "!=" to compare strings. Use the string function equals() or equalsIgnoreCase().

Member Avatar for Apache1
0
96
Member Avatar for adams161

He could just as easily extend JPanel and plug those into whatever top-level frames he wants to use for the OS.

Member Avatar for adams161
0
230

The End.