3,927 Posted Topics
Re: 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. | |
Re: Use [URL="http://download.oracle.com/javase/tutorial/uiswing/layout/gridbag.html"]GridBagLayout[/URL]. | |
Re: Try enclosing your ID value in single quotes.[code]string myCommand = "SELECT * FROM Manager WHERE UserName='" + ID + "'";[/code] | |
Re: [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. :-/ ![]() | |
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. | |
Re: [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 :) | |
Re: 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. | |
Re: Nope, doesn't work - and as a general rule we don't just hand students completed solutions to their homework problems. | |
Re: 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] | |
Re: 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 … | |
Re: 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, … | |
Re: @Unhnd_Exception: I believe they may actually be [URL="http://en.wikipedia.org/wiki/Easting_and_northing"]Northing and Easting[/URL] UTM values. | |
Re: 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] | |
Re: No, because this question is so non-specific as to be unanswerable. | |
Re: You could use [iCODE](Mr|Mrs|Miss){1}[/iCODE], but really equalsIgnoreCase() could be used just as well for those three specific cases. | |
Re: 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. | |
Re: 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. | |
Re: He already did above in this post: [url]http://www.daniweb.com/software-development/java/threads/355285/1513029#post1513029[/url] | |
Re: Show some effort. Ask specific questions. Do not simply post an assignment and expect a solution. | |
Re: Closing. Too many lazy people begging for a solution to be handed to them. | |
Re: Ask a specific question. Post the code that you have started with. | |
Re: 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 … | |
Re: 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. | |
Re: 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] | |
Re: [URL="http://www.wampserver.com/en/"]Wamp Server[/URL] is another all-in-one install option. ![]() | |
Re: [ICODE]FirstGUI[/ICODE] is not the same as [ICODE]firstgui[/ICODE]. | |
Re: Are you going to share the error or is this a guessing game? | |
Re: And I will be happy to tell him if he does ask. Complaining about moderation is not adding anything to this thread from 2009. | |
Re: Actually the movement is from (x2,y2) to new (x2,y2) and divide by the time since your last update. | |
Re: [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. | |
Re: There are [URL="http://java.sun.com/products/java-media/speech/forDevelopers/jsapifaq.html#implementation"]multiple implementations listed in the FAQ[/URL]. | |
Re: [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. | |
Re: 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. … | |
Re: These are not methods of Thread.[CODE]setFocusable(true); addKeyListener()[/CODE] | |
Re: 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. | |
Re: 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. | |
Re: 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] | |
Re: 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] | |
Re: Try here: [url]http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html[/url] | |
Re: Use an ImageIcon. Take a look through the [URL="http://download.oracle.com/javase/tutorial/uiswing/components/button.html"]tutorial on buttons[/URL]. | |
Re: 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 … | |
Re: For games, have you looked at [URL="http://jmonkeyengine.org/introduction/"]JMonkeyEngine[/URL]? It's an open-source 3D game engine for Java. | |
Re: 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. | |
Re: [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. | |
Re: 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. | |
Re: >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. | |
Re: 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. | |
Re: 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) … |
The End.