3,927 Posted Topics

Member Avatar for jrp370

You declared envelope by itself in a try-catch block and then tried to use it in a different block. It went out of scope when the first block ended, so essentially the second try-catch block can't "see" that variable.

Member Avatar for Ezzaral
0
193
Member Avatar for sirlink99

Use [URL="http://download.oracle.com/javase/tutorial/uiswing/layout/gridbag.html"]GridBagLayout[/URL].

Member Avatar for sirlink99
0
7K
Member Avatar for RobertKramers

Try enclosing your ID value in single quotes.[code]string myCommand = "SELECT * FROM Manager WHERE UserName='" + ID + "'";[/code]

Member Avatar for samuelmac
0
3K
Member Avatar for frogboy77

[B]> He might have fault too but he might be too careless to realise that [/B] Sure, maybe he mistakenly checked the "Cut off my balls" box because it was directly below "Remove gallstones" and the form was single-spaced. :-/

Member Avatar for diafol
0
203
Member Avatar for Ezzaral

The "Go to new post"(on the purple New button) and "Go to last post" (right side Last Post) links in the forum listings seem to be broken at the moment. They result in an invalid page. Edit: I also got an invalid page when I submitted this new thread.

Member Avatar for WaltP
0
107
Member Avatar for 1ML

[QUOTE=rubberman;1513772]Sorry, accidentally down-checked this post - unfortunately, once you do that I don't know of a way to undo it... my bad![/QUOTE] Yeah, unfortunately there is no way to cancel it even on an accidental click. I voted it back up to offset :)

Member Avatar for 1ML
0
586
Member Avatar for RagingRiver

Try [CODE]twoPanel.setLayout(new BoxLayout(twoPanel, BoxLayout.PAGE_AXIS));[/CODE] edit: Hmm, scratch that, it doesn't preserve the horizontal ordering that you wanted for the second panel.

Member Avatar for Ezzaral
0
414
Member Avatar for tmcculloch

Nope, doesn't work - and as a general rule we don't just hand students completed solutions to their homework problems.

Member Avatar for steelshark
0
152
Member Avatar for stupid guy

In the first case you posted, either "c" or "stmt" is probably null[CODE]c.stmt.executeQuery(str);[/CODE] In the second part, you only have two parameters specified in the query, so you can't set number 12[CODE]c.stmt.setInt(12,cnt);[/CODE]

Member Avatar for Ezzaral
0
131
Member Avatar for xanawa

You should be able to use the same basic structure as you did with the open(0 method, but use [URL="http://download.oracle.com/javase/6/docs/api/javax/imageio/ImageIO.html#write(java.awt.image.RenderedImage,%20java.lang.String,%20java.io.File)"]ImageIO.write()[/URL] to write the image out to file. Similar to this[CODE]if (chooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { File fileChoosen = chooser.getSelectedFile(); try { ImageIO.write(img,"bmp",fileChoosen); ...[/CODE]You may want to also take a look at …

Member Avatar for xanawa
0
114
Member Avatar for cryzone77

I'm wondering why you bother using the [ICODE]with[/ICODE] clause here and then repeat your variable?[CODE]With Adodc5.Recordset Adodc5.Recordset.AddNew Adodc5.Recordset.Fields("Name") = txtsibling1.Text Adodc5.Recordset.Fields("Age") = txtage1.Text Adodc5.Recordset.Fields("Birthdate") = Format(txtbirth1.Text, "mm/dd/yyyy") Adodc5.Recordset.Update Adodc5.Refresh End With[/CODE]It defeats the entire point of the [ICODE]with[/ICODE] statement[CODE]With Adodc5.Recordset .AddNew .Fields("Name") = txtsibling1.Text .Fields("Age") = txtage1.Text .Fields("Birthdate") = Format(txtbirth1.Text, …

Member Avatar for AndreRet
0
227
Member Avatar for karthik_ppts

@Unhnd_Exception: I believe they may actually be [URL="http://en.wikipedia.org/wiki/Easting_and_northing"]Northing and Easting[/URL] UTM values.

Member Avatar for karthik_ppts
0
103
Member Avatar for andyhunter

Simply add "newPerson" to your ArrayList. [CODE]List<Person> people = new ArrayList<Person>(); people.add(newPerson);[/CODE]You can retrieve them with [iCODE]get()[/iCODE][CODE]people.get(0); // returns first person in list[/CODE]

Member Avatar for thekashyap
0
152
Member Avatar for serdas
Member Avatar for serdas
-1
78
Member Avatar for andyhunter

You could use [iCODE](Mr|Mrs|Miss){1}[/iCODE], but really equalsIgnoreCase() could be used just as well for those three specific cases.

Member Avatar for andyhunter
0
87
Member Avatar for musikluver4

It's because you used the default layout in the frame, which is FlowLayout. Try BorderLayout and put the the title panel in NORTH and the mainPanel in CENTER.

Member Avatar for musikluver4
0
752
Member Avatar for xanawa

The stack trace tells you exactly which line the exception occurs on. Read it and figure out why the variable you are calling a method on is null.

Member Avatar for Ezzaral
0
544
Member Avatar for bhallarahul

He already did above in this post: [url]http://www.daniweb.com/software-development/java/threads/355285/1513029#post1513029[/url]

Member Avatar for Ezzaral
0
312
Member Avatar for Ancient Dragon
Member Avatar for user2030

Show some effort. Ask specific questions. Do not simply post an assignment and expect a solution.

Member Avatar for debasisdas
0
71
Member Avatar for Katana24
Member Avatar for Ezzaral
0
2K
Member Avatar for destroyer89100
Member Avatar for Ezzaral
-1
73
Member Avatar for mja0mja

Well, that would be part of YOUR project, yes? To write some image processing code for text extraction? Better get to searching for some resources on that, because I don't think anyone here will just hand you the code for it. (There are a ton of image processing libraries to …

Member Avatar for samraj
0
170
Member Avatar for DarkLightning7

The Oracle docs seem to be working just fine at the moment (your mileage may vary). Take a look at [URL="http://download.oracle.com/docs/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.io/javafx.io.Storage.html"]Storage[/URL] and [URL="http://download.oracle.com/docs/cd/E17802_01/javafx/javafx/1.3/docs/api/javafx.io/javafx.io.Resource.html"]Resource[/URL] for your file system questions.

Member Avatar for DarkLightning7
0
286
Member Avatar for asif49

Unless Class1 and Class2 are nothing more than simple data structures, the convention is to write getters that return those values rather than declaring them public. i.e.[iCODE]class1thing.getValue()[/iCODE]

Member Avatar for DarkLightning7
0
91
Member Avatar for 54uydf

[URL="http://www.wampserver.com/en/"]Wamp Server[/URL] is another all-in-one install option.

Member Avatar for diafol
0
193
Member Avatar for jdm
Member Avatar for jdm
0
179
Member Avatar for loungeowl
Member Avatar for Ezzaral
0
219
Member Avatar for sanujipillai

And I will be happy to tell him if he does ask. Complaining about moderation is not adding anything to this thread from 2009.

Member Avatar for Ezzaral
0
82
Member Avatar for gedas

Actually the movement is from (x2,y2) to new (x2,y2) and divide by the time since your last update.

Member Avatar for mKorbel
0
209
Member Avatar for hxmelvin

[B]> I need a php code ...[/B] Start writing then. When you have problems, post the code and specific questions. This is not a homework completion service.

Member Avatar for Ezzaral
-1
99
Member Avatar for harinath_2007

There are [URL="http://java.sun.com/products/java-media/speech/forDevelopers/jsapifaq.html#implementation"]multiple implementations listed in the FAQ[/URL].

Member Avatar for WolfShield
0
3K
Member Avatar for baroim

[B]>ps: are we allow to ask people here to review the site? [/B] Yes, you may post a review request in the [URL="http://www.daniweb.com/business-exchange/website-reviews/55"]Website Reviews[/URL] section.

Member Avatar for trangman
0
100
Member Avatar for davedrave

If you want to specify and replace a component at a particular grid position, you should switch to GridBagLayout. Store the gridx and gridy values in your ScrabbleButton class as you add them to the panel. On click, you will know which component to remove and replace in your layout. …

Member Avatar for Ezzaral
0
391
Member Avatar for sciprog1

These are not methods of Thread.[CODE]setFocusable(true); addKeyListener()[/CODE]

Member Avatar for sciprog1
0
224
Member Avatar for kholiokhong

Please be more specific about what you are having troubles with. Also, learn to indent your code because that is a monolithic mess you have posted and no one wants to read that.

Member Avatar for Ezzaral
0
113
Member Avatar for taumang

Apparently this is now being continued here: [url]http://www.daniweb.com/software-development/cpp/threads/353606[/url] Please direct further discussion to that thread. Taumang, do not continue to make new threads for this single problem.

Member Avatar for Ezzaral
0
106
Member Avatar for gedas

You need to use one of the inverse functions: [URL="http://download.oracle.com/javase/6/docs/api/java/lang/Math.html#acos(double)"]acos[/URL], [URL="http://download.oracle.com/javase/6/docs/api/java/lang/Math.html#asin(double)"]asin[/URL], or [URL="http://download.oracle.com/javase/6/docs/api/java/lang/Math.html#atan(double)"]atan[/URL] from Math. Which one depends on which sides you compute the line lengths for. Edit: If you've forgotten which sides relate to which function, Wikipedia has a graph and table here: [url]http://en.wikipedia.org/wiki/Trigonometric_functions#Right-angled_triangle_definitions[/url]

Member Avatar for Ezzaral
0
968
Member Avatar for Jessurider

Since you obviously ignored it, I'll point you right back to Jon's post on the first page of this: [url]http://www.daniweb.com/software-development/java/threads/352203/1496623#post1496623[/url]

Member Avatar for sourabh17
0
423
Member Avatar for wonder_laptop

Try here: [url]http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html[/url]

Member Avatar for JamesCherrill
0
116
Member Avatar for oldezwe
Member Avatar for rinizids

Use an ImageIcon. Take a look through the [URL="http://download.oracle.com/javase/tutorial/uiswing/components/button.html"]tutorial on buttons[/URL].

Member Avatar for sourabh17
0
83
Member Avatar for JavaNewbieEK

Since your assignment specifies it, do you not have any class notes related to StringTokenizer? Seems strange to me that you have an assignment on things that were not covered in class at all. StringTokenizer is also a legacy class and it's usage in new code is discouraged:[quote=The StringTokenizer API …

Member Avatar for anumash
0
193
Member Avatar for mangopearapples

For games, have you looked at [URL="http://jmonkeyengine.org/introduction/"]JMonkeyEngine[/URL]? It's an open-source 3D game engine for Java.

Member Avatar for elite01
0
295
Member Avatar for tj0101

The compiler just wants to make sure that your variables have been assigned a value before you use them in an expression. If you assign them a default value when you declare them, the compiler will be happy[CODE]double fees = 0;[/CODE] as you noted.

Member Avatar for jon.kiparsky
0
349
Member Avatar for khess

[QUOTE=Dexxta27]... I used to buy PC games, but then it just wasn't worth it. .... So I just get them online, get a crack and play the single player, or crack it for LAN play with friends....[/QUOTE] So they're "just not worth it", but you'll still steal them.

Member Avatar for Heyzaneretro
2
592
Member Avatar for mangopearapples

You could create a batch file that passes the first arg along as an arg to your program: [CODE=text]java -jar MyProgram.jar %1[/CODE]If you select your batch file in the "Open with..." dialog, the filename will be passed as that argument %1.

Member Avatar for mangopearapples
0
178
Member Avatar for chaithanyap

>check this out guys.. Why? It doesn't address the original poster's question and this thread is from 2009. Did you have a point in posting this code? If you did, please state it.

Member Avatar for Ezzaral
0
875
Member Avatar for pokuripavani

No one is going to hold your hand through this project. You have been given some suggestions, but you're going to need to show some effort on this and ask specific question if you expect to receive any further assistance.

Member Avatar for Ezzaral
0
127
Member Avatar for gunjannigam

I would agree with the above suggestions to get the [ICODE]ImageIO.read()[/ICODE] out of the [ICODE]paint()[/ICODE] method and override [ICODE]paintComponent()[/ICODE] instead of [ICODE]paint()[/ICODE] unless this is an AWT Applet. I'd also like to mention that you don't necessarily need to create another rotated instance of AffineTransform here[CODE] AffineTransform transform = (AffineTransform) …

Member Avatar for gunjannigam
0
499

The End.