3,927 Posted Topics

Member Avatar for onemanclapping

You are very close there: [ICODE]int[][] apostas = new int[n][7];[/ICODE] You want 'n' elements that each contain an array of 7 elements. Your outer loop [ICODE]for(int i=0;i<n;i++) [/ICODE] then denotes that first dimension, so[ICODE]aposta[i]=geraAposta(); [/ICODE]

Member Avatar for onemanclapping
0
157
Member Avatar for curtissumpter

Just add a call to [ICODE]super.paint(g)[/ICODE] prior to your own paint code. [code=java] public void paint(Graphics g) { super.paint(g); g.drawString(output, 50, 50); }[/code]

Member Avatar for toucan
0
3K
Member Avatar for yamster

I'm not certain if I understand what you are trying to do exactly, but perhaps it is this: [url]http://faq.javaranch.com/java/BackgroundImageOnJPanel[/url] ?

Member Avatar for JamesCherrill
0
101
Member Avatar for f.damati

You could start with the Sun tutorial on networking: [url]http://java.sun.com/docs/books/tutorial/networking/index.html[/url]

Member Avatar for Ezzaral
0
109
Member Avatar for Ancient Dragon
Member Avatar for GrimJack
0
73
Member Avatar for k2k

I just quickly glanced through the code, so perhaps I missed something, but it looks like you've added a JMenuBar to a JPanel and added that to your JFrame. I would recommend using [URL="http://java.sun.com/javase/6/docs/api/javax/swing/JFrame.html#setJMenuBar(javax.swing.JMenuBar)"]setJMenuBar()[/URL] method on JFrame to add the menu to the frame.

Member Avatar for k2k
0
182
Member Avatar for weblover

Is there any difference in those or did you post three copies of the exact same thing?

Member Avatar for Designer_101
0
346
Member Avatar for ppushpa
Re: JAVA

And a [URL="http://java.sun.com/javase/6/docs/api/java/util/Map.html"]Map[/URL] could prove useful in aggregating the values after you have parsed them.

Member Avatar for Ezzaral
0
69
Member Avatar for Nperic

I believe you should be able to cast the Node to an Element and use [URL="http://java.sun.com/javase/6/docs/api/org/w3c/dom/Element.html#getAttribute(java.lang.String)"]Element.getAttribute(java.lang.String)[/URL] (Just guessing though - we use JDOM here instead of that api)

Member Avatar for Ezzaral
0
138
Member Avatar for redmaverick

Stating why you are unable to execute that code might prove useful to someone inclined to offer advice on it. Your file names are just fine, but I would remove the package declaration from "Testing", unless you have re-created the directory structure of those files.

Member Avatar for Ezzaral
0
123
Member Avatar for LouieAnn

[QUOTE=LouieAnn;846708][CODE]uhm can u give me advice about cs thesis?? [/CODE][/QUOTE] uhm... don't just skip it or you may fail?

Member Avatar for Nick Evan
0
98
Member Avatar for 7arouf

Netbeans does support PHP now and it does have a visual designer, but I have not used it for PHP and can't speak to it's strengths/limitations.

Member Avatar for BzzBee
0
314
Member Avatar for king_786
Member Avatar for Lensva

Just a couple of minor but important changes in your setGui() method[code] public void setGui() { JFrame frame = new JFrame(); // remove this, you want to use your current class instance here // JPanel drawP = new JPanel(); // again, current instance addMouseListener(this); // same here frame.getContentPane().add(BorderLayout.CENTER, [B]this[/B]); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); …

Member Avatar for Lensva
0
1K
Member Avatar for Grn Xtrm

Are you compiling against java 1.5 or later? Those declarations of Vector are perfectly valid post-1.5. You have other issues with using get(Object) calls that are not valid, but the declarations are fine.

Member Avatar for Grn Xtrm
0
537
Member Avatar for Vanq69

Why not mark it solved yourself? The link is right there at the bottom of the thread :)

Member Avatar for Ezzaral
0
94
Member Avatar for clutchkiller
Member Avatar for k2k

You could take a look at Web Start: [url]http://java.sun.com/docs/books/tutorial/deployment/webstart/index.html[/url]

Member Avatar for k2k
0
169
Member Avatar for emarshah

I believe he wants to redisplay the values that the user entered if the form fails validation and needs to be edited and resubmitted.

Member Avatar for Designer_101
0
145
Member Avatar for ramareddy_dotne

And complaining that [I]volunteer[/I] help does not meet your personal expectations is rude as well.

Member Avatar for ShawnMilo
0
3K
Member Avatar for jam7cacci

What you are wanting to do has absolutely nothing to do with a for() loop. You need a simple if() check on a counter variable that is incremented by your click event - something like [code]int clickCount=0; void mouseClicked(){ ++clickCount; if (clickCount > 0){ // do whatever } else { …

Member Avatar for Ezzaral
0
89
Member Avatar for BestJewSinceJC

You can create that menu bar as a reusable bean form by selecting the following: [icode]New > Swing GUI Forms > Bean Form[/icode] and specifying [ICODE]javax.swing.JMenuBar[/ICODE] as the super class in the final step of the wizard. After you have it built, you can add it to a JFrame by …

Member Avatar for Ezzaral
0
103
Member Avatar for Ancient Dragon

[QUOTE=xkey;825830]such individuals logic is non-existent/faulty. An omnipotent being can manipulate the universe and adjust the laws and principles (of physics, of mathematics or even of existence itself) of that universe ... or to paraphrase "through God all things are possible"[/QUOTE]Ah, well at least there isn't anything wrong with [I]this[/I] logic. …

Member Avatar for GrimJack
0
1K
Member Avatar for smsamrc

Of course, it's a lot easier if you just have the index of your array/list be the power: [icode]4x^2+5x^3+6 --> [6, 0, 4, 5][/icode]

Member Avatar for smsamrc
0
2K
Member Avatar for redmaverick

Your error message should also indicate which method does not exist. Which one is it complaining about?

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for llemes4011

Here's a skeletal recursion for it. You just need to figure out the depth part[code=java]public void listFiles(File dir){ for (File file : dir.listFiles()){ if (file.isDirectory()){ listFiles(file); } else { // whatever } } }[/code]

Member Avatar for llemes4011
0
99
Member Avatar for lelandstrott

You can use the [URL="http://www.herongyang.com/jdbc/JDBC-ODBC-MS-Access-Connection.html"]JDBC-ODBC Bridge driver to work with MS Access[/URL]. Here is the tutorial on using JDBC if you are not familiar with it: [url]http://java.sun.com/docs/books/tutorial/jdbc/index.html[/url]

Member Avatar for Ezzaral
0
34
Member Avatar for csinquirer

>can you list those as well? Why? If you are looking for a reference on a particular topic, ask about it. "hundreds of books on... (blah)" isn't useful to anyone at all, unless they really want to learn about the book purchasing habits of some random individual on the internet.

Member Avatar for ddanbe
0
147
Member Avatar for daffer

You already have a constructor using Image and AudioClip, so what problems are you having with that? And you add code tags like this: [noparse][code] ... your code here ... [/code][/noparse].

Member Avatar for javaAddict
0
128
Member Avatar for king_786

[QUOTE=king_786;842585]thats wah i mean i dnt knw hw 2 start it[/QUOTE] Drop the lazy "chat speak". Read the forum rules regarding posting in proper English. This is about the fourth homework assignment that you have posted verbatim without showing any effort or even a thought on the matter. This is …

Member Avatar for BestJewSinceJC
0
110
Member Avatar for BestJewSinceJC

It depends entirely on the layout manager you have set and how you add the JTabbedPane component. It will behave like any other container component in that context. [code]JTabbedPane tabPane = new JTabbedPane(); tabPane.add("Test 1",new JPanel()); tabPane.add("Test 2",new JPanel()); getContentPane().add(tabPane); pack();[/code]will create a tabbed pane that fills the frame.

Member Avatar for BestJewSinceJC
0
199
Member Avatar for noodlecode

Movement through a circular structure such as a circular array, degrees of rotation, days of the week, etc.

Member Avatar for thoughtcoder
0
126
Member Avatar for rockin_rebel

[ICODE]characters[i].isLowerCase()[/ICODE] is not valid for char - it's a primitive, not an object.

Member Avatar for rockin_rebel
0
3K
Member Avatar for jacline

You need to update the coordinates of existing circles if you wish for them to change size or position. I'd recommend taking all code that creates or changes the size out of the paintComponent() method. That should just render the circles you have created. Handle the adding of a new …

Member Avatar for Ezzaral
0
171
Member Avatar for brizwhiz

Take a look at the end of line 14 where you have the while statement. See anything that perhaps should not be there?

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for coolbuddy059

By 29 posts, you should understand how to use [noparse][code] [/code][/noparse] tags. As for the exception, make sure you have that jar file in your class path.

Member Avatar for Ezzaral
0
97
Member Avatar for petike

>Is this the good technique (I mean in performance) to do all the drawing on some image and then draw that image at once to the screen Yes, that is typically what is done. You can update portions of the image as you wish and paintComponent() just renders that image …

Member Avatar for Ezzaral
0
274
Member Avatar for bamboebahr

I hope you are not holding your breath as you wait, since homework help is generally only given to those who demonstrate some effort. These are not "code by request" forums. Post your code and state what problems you are having or ask specific questions about concepts you do not …

Member Avatar for bamboebahr
0
100
Member Avatar for Upsilon

And JOGL is available if you want to work with OpenGL instead of the Java3D scene graph model.

Member Avatar for BestJewSinceJC
0
287
Member Avatar for forzadraco
Member Avatar for ani151

Which language are you developing this panel in? Knowing that would greatly help :)

Member Avatar for ani151
0
172
Member Avatar for rm_daniweb

Ok. I don't see any significant difference here from this thread: [url]http://www.daniweb.com/forums/thread185073.html[/url] so I'm going to shut this one down. I think there are too many replies in both threads to be able to merge them and have any semblance of continuity remain. rm_daniweb, in the future restrict conversation on …

Member Avatar for Ezzaral
0
13K
Member Avatar for king_786

You need to demonstrate more effort on these questions that you are posting. Simply posting the assignment is not sufficient and no one is going to just complete these for you. Post what code you have. Ask specific questions about concepts you are struggling with.

Member Avatar for bluesea50
0
116
Member Avatar for mnieber

[code]Trash t = new Trash(); t=null; System.gc(); System.runFinalization(); [/code]does run the finalization. Finalize is a bit of a tricky thing and really shouldn't be relied upon as a cleanup mechanism. If you need to close resources, you should put explicit methods in for that and call them when required. You …

Member Avatar for Ezzaral
0
128
Member Avatar for hillstone_softw

Welcome to DaniWeb. Perhaps you can find useful marketing suggestions in our Internet Marketing forums.

Member Avatar for Ezzaral
0
134
Member Avatar for almis

So you would just need to "group by" table and use another aggregate function to sum them up. I bet you can find that function pretty easily.

Member Avatar for almis
0
110
Member Avatar for TriniBabe

Interfaces do not have any code themselves. They are a set of method declarations that are required by a class that implements that interface. The interface is a guarantee that those methods are available on any class that implements it. The code for those methods goes in the class that …

Member Avatar for Ezzaral
0
76
Member Avatar for asd32

This increment will work[code]t += (count%3==0 ? 0.3 : 0.1);[/code] but you'll have to figure out the loop to go around it. It's not a complex one.

Member Avatar for Ezzaral
0
131
Member Avatar for slimford
Member Avatar for Robdale
0
16
Member Avatar for mmazone

The End.