4,084 Posted Topics
Re: define "doesn't run". does it give you a stacktrace, or does it just not run? I tried your code here. you get NullPointerExceptions, because you don't instantiate your 'internal JFrames' which are actually just JFrames, not internal jframes. start with instantiating those. | |
Re: have you checked something like [this](http://www.dzone.com/articles/struts-hello-world-tutorial)? | |
Re: quite some "ugly" code. just a suggestion. replace this: if(col==0) return index; else if(col==1) return ticket; else if(col==2) return date; else if(col==3) return description; else if(col==4) return priority; else if(col==5) return state; else if(col==6) return followup; else return status; with a switch statement. easier to read and overall better performance. | |
Re: and what exactly is your question? how to do this in Java? how to do this in sql? ... ? are you using foreign keys? ![]() | |
Re: a function.. no, Java has methods. not sure if there's a method for this anywhere, but that doesn't mean you can't write one. EDIT: I'm curious, though ... how do you get to that 'output'? afaik: the output for the first would be somwhere around 2.18, and for the second … | |
Re: [QUOTE=JSupport;1760340]Hopefully the following thread will help you to create JDBC connection to Access Database [URL="http://javasrilankansupport.blogspot.com/2012/02/connect-to-access-database-using-java.html"]Connect to Access Database Using Java[/URL] [URL="http://javasrilankansupport.blogspot.com/2012/02/connect-to-access-database-using-java.html"]http://javasrilankansupport.blogspot.com/2012/02/connect-to-access-database-using-java.html[/URL][/QUOTE] hopefully they didn't need 6 years to figure that one out :-| | |
Re: you can ask them all that pops up. it can work out right, it can work out bad: if you ask more technical stuff, chances are you're talking to a recruiter that doesn't know anything about that. you can ask about flex-time, about the working environment (is it strictly business, … | |
Re: I guess they wanted a 'Dude', but using [this one](http://3guys1movie.com/wp-content/uploads/2012/12/Lebowskilimo.jpg) would have cost too much :) | |
Re: well ... if this code is Java, I would suggest to drop this for now, and go over the basics once more. can you find the obvious mistake you've made here: int Selection = Main.Select_Use_Move_Items(Col); if Selection = 1 {Perform function A} if Selection = 2 {Perform function B} if … | |
Re: you are mixing up arrays and single Strings. also, you should initialize your array once, not each time you access it. | |
Re: create a combobox untill value come? a combobox for each value? that makes no sense. a combobox that contains all those values, now that I understand. | |
Re: there are two ways to end a for loop (not only for a for loop, btw, the same applies for if statements, .... 1. by using brackets. you can clearly tell the JVM where the scope lies: for ( int x = 0; x < 5; x++){ // no matter … | |
Re: try it like this: System.out.printf("The tip amount is $" + "%5.2f", tipAmount); System.out.printf("The Total ticket price is $" + "%5.2f", total); the printf statement follows a certain structure: basically: String - format - value to format. you can't just add a String at the end and expect it to work … | |
Re: most likely you've imported a wrong Date class. also, don't know whether it is an error in copy paste, but there seems to be no opening bracket in your Date class. | |
Re: you must either declare that method as static, or call it through an instance of NumberCheck. | |
Re: also, check your contract. also the fine prints. if it says that the customer has the right to do so, you don't really have much to go on. do check online whether the customer is going to use your site. if he does, it's clearly he broke the contract under … | |
Re: Thokozani_1: welcome to DaniWeb. sharing your knowledge and solving problems is a good asset, but this problem was solved a year ago, the OP even stated how he solved his problem. there's no need to revive old threads, especially not those that are already solved. | |
Re: I don't see anything wrong there, but since we don't have the entire code, we can't actually test it, I guess. | |
Re: 1. I don't see any question in your post 2. this is the Java forum. Java (unlike it's name might suggest) is not related to JavaScript. this post might be more for [this forum](http://www.daniweb.com/web-development/javascript-dhtml-ajax/117) 3. there is no big mistery in performing several actions on a single button click. what … | |
Re: either don't allow the JFrame to be resizable, or, every time it is resized, re-calculate the size/position of the image and re-paint it. | |
Re: so .. at the end of each (outer-) for loop, add a print statement, printing the current order. what exactly is your question? | |
Re: not sure what exactly you are trying to do, but wouldn't it be better to use your OS 's login system for this? | |
Re: Deprecated basically means: this is out of date. there's a newer (read: better) way to do this. especially when writing new software, it is not wise to use deprecated calls in your code. in order to allow older software still to work they won't remove them from the api's, but … | |
Re: sirlink: no, not really. `String a;` just creates a reference, it doesn't initializes it, so, String a; => a is not ""; if a would be an instance variable, it would get the default value for an object, which is null. not something you would want to pass, but better. … | |
Re: well, in that case either the JavaScript or PHP forum comes to mind. | |
Re: why would videos help you learn better? most likely, all ( or most of ) what you need, can be found [here](http://www.lwjgl.org/) | |
Re: you can also use a webservice, which you call. then you just use the url, and let that webservice do the communication with the db. | |
Re: cool zephyr: do you even know what a Singleton is? just by adding 'this is a singleton' in a comment doesn't make it one. so. were you planning on making it a singleton or not? | |
Re: and change this: public static void main(String[] args) throws ClassNotFoundException into a way that you actually handle the exception should it occur. if you keep it like this, you'll never be able to prevent the application from crashing. having code that might crash is a bad thing, but having that … | |
![]() | |
Re: Below is my program which DID NOT connect , do you see why "which DID NOT connect" doesn't help us? are you getting an error message? [this](http://docs.oracle.com/javase/tutorial/jdbc/) would be the best place for you to start, but have you considered the possibility that you're DB is not running? | |
Re: ... that's about the same as asking: 'why having applications while we have classes, interfaces, ....' a service can be seen as a group of classes/interfaces/... bundled together to perform certain tasks and provide certain functionalities that can be used by an unlimited amount of applications. for instance: google's gmail … | |
Re: why don't you want to use a form? that is exactly designed to communicate the values of the fields to servlets. | |
Re: might be in the initialization of that Scanner instance. without seeing more of the code, or the error message, don't think we can do much to help. | |
Re: also: if you want to keep the actionPerformed in the class itself, always use this, not an instance of the class. you risk getting in something like this: public class MyFrame extends JFrame implements ActionListener{ MyFrame sFrame = new MyFrame("other Screen"); private JTextField field = new JTextField(); private JButton but … | |
Re: and by that description you think we can help? you don't show any code, you don't show any of the logs, you don't mention which framework(s) you use, or how the configuration is implemented ... tons of possible reasons, I'm afraid. | |
Re: ehm ... maybe the exceptions don't occur? | |
Re: also: is there a question in there, or are you just trying to bash your student? | |
Re: or better yet, start with stating what your actual question is .. | |
Re: `if (test == "false")` either test is a boolean, or it is a String ... either way, it is badly coded. in case it's a boolean, you'll want one of the next options: `if ( test == false )` `if ( test != true )` or, the simplest of all: … | |
Re: those I use for myself: - Chrome. user friendly, fast, and, let's face it, when you look at the resources it uses, it's clearly not one of Microsoft's CPU/Memory draining black holes. - FireFox: those plug-ins do come in handy, not just for development, but, well... is there anything (except … | |
Re: your first error is in that loop: `for (int b = 0; b < grades.length; b++) { .. }` remove that, you don't need it. also: don't set the values in the array, extract them instead. at this point, you are overwriting the values in your array. your second error: … | |
Re: can't proceed from here ... what does it do? what is your next step? why can't you proceed. also: do you understand why it is bad design to allow your main method to throw Exceptions? did you write that code yourself? | |
Re: step one: press that shift lock key again. it'll make your posts seem less aggressive. step two: show what you have done. what do you need help with? we can't look into your computer to see what code you're running, you know. | |
Re: do you understand why this: reference = new FullTimeEmp(firstName,lastName); reference = new FullTimeEmp(baseSalary,hoursWorked); is pointless coding? | |
Re: do understand that most 'certifications' don't come with mandatory courses, so when asking for a certification, people might get the wrong idea :) well, there are several, but it also depends on where you are. it's possible that the institution you got your degree offers one, have you checked there? | |
Re: you'll need a reference through which you can access it. my advice: re-work your code, start by the analysis, check the IS-A, HAS-A relationships and see whether it 'll work. another thing you might think about: reduce the number of lines in your main method to the absolute minimum. it … | |
Re: ggamble: that's still not hacking into anything. also, there are tons of webapplications 'out there' that won't allow you to see the source code, so the "anything is possible" might be a bit exaggerated :) | |
Re: a tool to easily manage and create your html / css code can be helpfull, but only if your knowledge of html/css is at such a level that you can create most of it without using it. lots of people who don't, either use fixed templates which can be found … ![]() |
The End.