3,927 Posted Topics

Member Avatar for euphoriae

None of your classes implement MouseListener, which has a couple more methods than just mousePressed(). If your MeltingSnowman class implemented MouseListener, you could add it as a mouse listener to your Frame. Or you could add an anonymous inner class that extends MouseAdapter and forward the mousePressed() event to your …

Member Avatar for Ezzaral
0
182
Member Avatar for preetykinza

No, they really won't, because they just posted their homework assignment without demonstrating any effort whatsoever - which runs afoul of the announcement in all of the dev forums: [url]http://www.daniweb.com/forums/announcement8-2.html[/url]

Member Avatar for Ezzaral
0
61
Member Avatar for RoyR

I would recommend Java or C#. There are forums for both of those here to assist with questions: [URL="http://www.daniweb.com/forums/forum9.html"]Java[/URL] [URL="http://www.daniweb.com/forums/forum61.html"]C#[/URL] The Java forum has a [URL="http://www.daniweb.com/forums/thread99132.html"]Read Me: Starting Java[/URL] post at the top of the forum with plenty of information to help you get started. I didn't see such a …

Member Avatar for antiquee_1987
0
193
Member Avatar for bigginge

[URL="http://recaptcha.net/"]Recaptcha[/URL] is good, free, and easy to implement - plus you're helping to digitize books at the same time.

Member Avatar for digital-ether
0
128
Member Avatar for serkan sendur
Member Avatar for cproud21

Yes, that's what objects are for and you can place any object type you want into a combo box. The toString() value of the object will be displayed as the text if the object is not itself a String. So consider how a small class like this could be used[code=java]class …

Member Avatar for peter_budo
0
138
Member Avatar for Ancient Dragon

[QUOTE=jbennet;728566]yeah im staying up all night (its all going on between 2300 and 0600 GMT)[/QUOTE] Ouch! That's dedication! I'm hoping to be in bed by midnight here in Central Standard (GMT-6)

Member Avatar for itdupuis
0
357
Member Avatar for OreWaChoOtakuDa

[quote=Infarction;398043]I'll make the assumption that the email you sent had reasonably proper punctuation and spelling, unlike your posts (which walk a fine line of understandability)... :icon_wink:[/quote] hehehe... These were my thoughts as well :P

Member Avatar for Kokimail
0
1K
Member Avatar for GrimJack

My wife mentioned that she was sure to get some flak over that dress. Of course, my response was "huh? dress? I hadn't really noticed.". I guess stuff like that just doesn't even register with me very often.

Member Avatar for christina>you
0
192
Member Avatar for joshmo

If you don't ever change x or y, it's going to keep overwriting the same element forever.

Member Avatar for joshmo
0
377
Member Avatar for AceAtch

And what is that error? It should indicate the nature of the problem and the line number on which it occurs. One thing I would point out is the missing parenthesis on this method call [icode]Circle.radiusInt[/icode]

Member Avatar for javaAddict
0
180
Member Avatar for VENOM <3

[QUOTE=VENOM <3;730554]im bored. im posting this because im bored. yup... ughhhhhhhhhh.... im soooooooooooooooooooooo bored... is there anyone out there that wants to chat??? anyone??? at all? =|[/QUOTE] [URL="http://www.google.com/search?sourceid=mozclient&ie=utf-8&oe=utf-8&q=california+inmate+penpals"]All of these people do[/URL]. They're bored as well, I imagine.

Member Avatar for sneekula
-1
84
Member Avatar for BestJewSinceJC

You missed the ! (not) operator in my code to toggle the glass pane on/off. You aren't ever setting it visible :) Do this[code]getGlassPane().setVisible( !getGlassPane().isVisible() );[/code]

Member Avatar for BestJewSinceJC
0
81
Member Avatar for BestJewSinceJC

If you are wanting to paint the line over a grid of JButtons, you'll need to create a small component to install as the glass pane (you read about glass pane [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html"]here[/URL]). The code to paint the lines will go in the paintComponent() method of that class. Here is a …

Member Avatar for BestJewSinceJC
0
92
Member Avatar for tupacpalaman
Member Avatar for William Hemsworth
0
201
Member Avatar for dimples09

Huh? That is exactly what you are doing here[code]envStack.push(envA);[/code] Perhaps you need to restate the question?

Member Avatar for destin
0
75
Member Avatar for britto

[url=http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html]ProcessBuilder[/url] or [URL="http://java.sun.com/javase/6/docs/api/java/lang/Runtime.html#exec(java.lang.String,%20java.lang.String[],%20java.io.File)"]Runtime.exec()[/URL]

Member Avatar for stultuske
0
167
Member Avatar for jbennet

Well, if they are four individual variables you could use nested min/max calls[code]int a = 2; int b = 22; int c = 3; int d = 345; System.out.println(String.valueOf(Math.min(Math.min(a, b), Math.min(c, d)))); System.out.println(String.valueOf(Math.max(Math.max(a, b), Math.max(c, d))));[/code] If they are an array, you could just call Arrays.sort() and pull the first …

Member Avatar for jbennet
0
107
Member Avatar for dnmoore

It works just fine for me as well. The only "disappearing" I could see is that the label will move depending on the length of the value displayed in the "result". That is because you used FlowLayout.

Member Avatar for dnmoore
0
97
Member Avatar for programmingme

First, make sure all code you post is in [noparse][code][/code][/noparse] tags (there is a button to apply them to highlighted code in the post editor). Second, you can't use primitives "by reference". Your function needs to return the result of the calculation. Objects passed as parameters can be modified by …

Member Avatar for programmingme
0
145
Member Avatar for MrDiaz

"Objects are the same" is the entire purpose of the equals() method. [url]http://www.ibm.com/developerworks/java/library/j-jtp05273.html[/url]

Member Avatar for MrDiaz
0
116
Member Avatar for king_khan

[QUOTE=sameya qazi;730040]how can i get the an my questionfrom this website?[/QUOTE] You could start by making some sense I suppose.

Member Avatar for Ezzaral
-1
189
Member Avatar for gowrishg
Member Avatar for gowrishg
0
136
Member Avatar for jkun2

If you just want to append to the string generated by the parent class toString() method, use this[code]return super.toString() + " [" + college + "]"; [/code]

Member Avatar for jkun2
0
132
Member Avatar for java-clueless

How should we know? Is it doing what you expect it to do? If not, what is wrong with it? Be specific. If you want someone to read it, you need to post it in [noparse][code][/code][/noparse] tags so the indentation is preserved instead of that wall of unformatted mess.

Member Avatar for Ezzaral
0
90
Member Avatar for smakos

I voted "very urgent please". Perhaps if you post the code here in [noparse][code][/code][/noparse] tags people will be a little more inclined to look at it.

Member Avatar for bobocqu
0
112
Member Avatar for adetya

[QUOTE=adetya;727697]cant u read?[/QUOTE]Can't [U]you[/U] write? [QUOTE=adetya;727697]ACCOUNTING MAJOR...i dont have any background in this.this is the first and definatly the last cis course ill be taking ever.[/QUOTE]YOUR COURSEWORK. Regardless of your background, you can either make the effort to pass or fail the course. [QUOTE=adetya;727697]plus i really dont think i nything …

Member Avatar for masijade
0
178
Member Avatar for christina>you

[QUOTE=christina>you;727923]Obama isn't.[/QUOTE] Says your propaganda.

Member Avatar for christina>you
0
134
Member Avatar for rhy

[QUOTE=Davonpk;714700]well i think that it is easier to learn java then to start learning a programming code but it depends on which type of job your looking for i personally think C# is the best for a programming language[/QUOTE] This statement makes little sense. Are you under the impression that …

Member Avatar for ithelp
0
161
Member Avatar for Lardmeister

... and thus were the beginnings of [URL="http://en.wikipedia.org/wiki/Skynet_(Terminator)"]SkyNet[/URL].

Member Avatar for sneekula
0
765
Member Avatar for The Dude

*adjusting tin foil hat* Oh, it's already in place. The New World government and their alien puppeteers carefully control all of the information you receive.... [url]http://en.wikipedia.org/wiki/Coast_to_Coast_AM[/url]

Member Avatar for GrimJack
0
134
Member Avatar for amroto

Use basic math to translate your values to pixel coordinates. You are just drawing on a rectangle of getHeight() and getWidth() dimensions. (Hint: the middle is just [getWidth()/2, getHeight()/2] and y' = getHeight()-y ) Or translate the graphics context to the origin you want and invert the y scale on …

Member Avatar for Ezzaral
0
116
Member Avatar for complexcodes

Correct. The mouse event will supply the current coordinates of the mouse, which you can use to calculate your new rectangle coordinates. The paintComponent() method can then draw a rectangle with those coordinates when you call repaint().

Member Avatar for BestJewSinceJC
0
574
Member Avatar for sahrourr

Well, understanding how to solve it is going to be pretty important to coding it, wouldn't you say? You need to start with some pseudocode of your approach and then start writing the Java code to carry it out. Post your code and specific questions if you have difficulties.

Member Avatar for Ezzaral
0
109
Member Avatar for new_2_java

Two options: 1) Give the program more memory with -Xmx: [url]http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html#options[/url] 2) Use less memory. That may involved using a smaller thread pool or limiting buffer sizes for file operations, etc.

Member Avatar for ~s.o.s~
0
139
Member Avatar for blackcloud72

Easy to do with a Swing [URL="http://java.sun.com/javase/6/docs/api/javax/swing/Timer.html"]Timer[/URL] that toggles a "paint string" boolean on and off and calls repaint(). Just have your paint method check that variable before drawing the string.

Member Avatar for Ezzaral
0
667
Member Avatar for yonghan

Since you are using DefaultTableModel, use [URL="http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#addRow(java.lang.Object[])"]addRow()[/URL] to add the row. [URL="http://java.sun.com/javase/6/docs/api/javax/swing/JTable.html#editCellAt(int,%20int)"]JTable.editCellAt(int,int)[/URL] to set the editing cell.

Member Avatar for yonghan
0
101
Member Avatar for Grub

First off, read the tutorial on using custom cell renders: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#renderer[/url] and here is another example: [url]http://www.exampledepot.com/egs/javax.swing.table/CustRend.html?l=rel[/url] The render will be called for each cell in the table that you have registered it for. Look at the parameters that are supplied when the render is requested:[code]getTableCellRendererComponent(JTable table, Object value, boolean …

Member Avatar for Grub
0
2K
Member Avatar for mrjoli021

A few well-placed System.out.println() statements to verify what you are trying to delete would be a good place to start.

Member Avatar for Ezzaral
0
235
Member Avatar for ndeniche

Yes, [URL="http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html"]that is what JApplet is for[/URL].

Member Avatar for Ezzaral
0
105
Member Avatar for eightiesbaby80

Toss up between Iron Maiden and Metallica. Runners up include Megadeth, Testament, Anthrax, Overkill, Helloween, and Queensryche. Honorable mentions to Slayer, Ozzy, Exodus, Savatage, Rage, Annihilator, Death Angel, and Metal Church.

Member Avatar for dickersonka
0
296
Member Avatar for Taker

Perhaps you would like to explain which methods you are having trouble with in that wall of code? That's a lot of extraneous UI code to wade through to distill the relevant pieces you want to work with.

Member Avatar for Ezzaral
0
151
Member Avatar for bahr_alhalak

Nope. Too many "e"s in the title. (Also, you haven't explained precisely what trouble you are having with the program.)

Member Avatar for dickersonka
0
269
Member Avatar for nischal.hp

These may answer a lot of questions for you: [LIST] [*][url=http://www.gamedev.net/community/forums/topic.asp?topic_id=317688]A Potential Game Programmer's Guide to a Future in the Industy: Degree Mappings[/url] [*][URL="http://www.gamedev.net/community/forums/topic.asp?topic_id=356663"]Question a grizzled and not yet bitter veteran[/URL] [*][URL="http://sloperama.com/advice.html"]Tom Sloper's Game Biz Advice[/URL][/LIST]

Member Avatar for ufg123
0
90
Member Avatar for Grub

Yes, it's possible to "add further functionality" by composing new classes of your own that use those classes internally to extend or alter the functionality (assuming there are not licensing issues). Of course, you do need to understand the API of the other classes if you expect to do much …

Member Avatar for Grub
0
125
Member Avatar for liquoriser21

[QUOTE=liquoriser21;719738]Im not really concerned and bothered by that! Im living programming not English[/QUOTE] And it sounds like that isn't working out so well for you. :-/

Member Avatar for vegaseat
0
239
Member Avatar for cproud21

The constructor needs to declare that it throws that exception.[code]public TestScores(double[] s) throws InvalidTestScore {[/code] You also need to: - Use a constructor that actually exists for InvalidTestScore. - Use an appropriate constructor for TestScores in ExTest. - Check the spelling of your exception and use the right one.

Member Avatar for Ezzaral
0
139
Member Avatar for askhan

Read the API for the [URL="http://java.sun.com/javase/6/docs/api/java/lang/Math.html"]Math[/URL] class.

Member Avatar for dickersonka
0
82
Member Avatar for BestJewSinceJC

Have you already read through the entire tutorial on [URL="http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html"]Using the GridBagLayout[/URL]? The layout you want isn't difficult to achieve, but getting used to the way the constraints work does take some time and experimentation. For your particular question, try giving the text fields a weightx of 1.0. This will …

Member Avatar for Ezzaral
0
110
Member Avatar for aashish.raina
Member Avatar for Ezzaral
0
73

The End.