4,084 Posted Topics
Re: put your javascript in a .js file, and your styles and layouts in a .css file. you can them import them with a single line of code in each html file you want. | |
Re: hmm, I first thought your problem was, when you had: D:\MOVIES\2011\SUN IS SHINING.avi to print only SUN IS SHINING.avi for having: D:\MOVIES\2011\SUN IS SHINING.avi D:\MOVIES\2011\SUN IS SHINING 2.avi if you want them both, contains("SUN") would be what you want if you need to print out the title alone, not the … | |
Re: what isn't working on it? do you get an error message? what do you want it to do and what does it do? | |
Re: and why do you allow your main method in the RemoveLineComments class to throw an Exception? | |
Re: sure, I'll give you the code: [Code=Java] public class Mailer{ public static void main(String[] args){ sendMail(); } private static void sendMail(){ } } [/Code] see? it's almost complete. all you need to do is specifiy the sendMail code a bit more | |
Re: JComboBox has a few methods that can help you in such cases. since you only want to have one item selected, you should use the getSelectedItem() method. if you want more information about what it does/returns, look at the [URL="http://docs.oracle.com/javase/6/docs/api/javax/swing/JComboBox.html"]JComboBox api[/URL] | |
Re: what exactly do you mean by GUI packages and GUI designers? believe it or not, there still are tons of applications written in Swing out there, but since they don't reach the internet but are used in-house, you won't hear from them. if you mean: is it worth it learning … | |
Re: well, you may want to start with showing the actual code (html and css) I assume that's a bit where it goes haywire | |
Re: what you want is that they become visible when you click a button? add them all when initiating your application, but hide and show them when the buttons are clicked. | |
Re: [QUOTE=AbdullahJava;1770683]Thank you very much But when i put three same words it says In alphabetical order those are: foo foo foo[/QUOTE] well ... duh. about your if statement question: yes, there is. String implements the comparable interface, so you could use the compareTo method. run a check on the value … | |
Re: why do you create a new thread for this? you marked this as 'solved' yesterday. [URL="http://www.daniweb.com/software-development/java/threads/414824"]http://www.daniweb.com/software-development/java/threads/414824[/URL] | |
Re: wouldn't know about that. I hardly ever use it, but just after reading this, I tested it in Chrome (query = JOptionPane) and I got a very fast result. maybe your connection that is slow? | |
Re: define "know" I'll just list all those I've worked in, not saying I know all of them in debt. assembler Cobol Java VBA VB6 C++ perl JavaScript & JQuery HTML, XML, CSS, JSP, .. SQL ![]() | |
Re: status: you don't have a variable named status currentAirport = dest; you don't have a variable dest in that scope number = nbr; I assume you mean: number = loc; and the last one, exactly the same reason as the first problem | |
Re: both this thread as that article are pretty out-of-date. I doubt many IT people out there still have Windows XP or 2000 running on their primary machine :) | |
Re: replace System.out.print(Character.toUpperCase(x.charAt(0))); with System.out.print(Character.toUpperCase(x.charAt(ctr))); the way your code is now, you are always setting your first character (index = 0) to upper case. | |
Re: what exactly do you want? to reverse the String? if you want to keep it like this, you'll have to create a String (say, y = "";) and say: y+= x.charAt(x.length() - ctr); and yes, I just briefly looked over your code, there might be a conflict with your counters, … | |
Re: how can you have a School constructor at all, not to mention, how can you have one in your Students class? you say it doesn't run? I doubt it even compiles. check the error messages you get, those you can solve, solve them, those you can't, paste them here, and … | |
Re: well, of course you can, just write your own Date class. but you can always set the date you want using the mutators. | |
Re: yes well, 'you're getting a nullpointerexception at line 35 of your university class, but unless you post that code in a separate code block, it'll be a bit difficult for us to see what that line does. | |
Re: well ... your id = age and your name = child where do you get the numofChild? | |
![]() | Re: in your main method, you don't have an oddArray or evenArray, neither do you have one on class scope, so how do you think you can use them in the main method? also, why do you try to create methods outside of your class? and , yet another thing: return … |
Re: well, you're asking input using JOptionPane boxes, but you're not using it, after which, you are asking input in Scanner, but without letting the user know so, try this: [Code=Java] int year = Integer.parseInt(JOptionPane.showInputDialog(null, "Please enter your year of birth: ")); [/Code] and drop that .nextInt(); if you need to … | |
Re: your list is named classmates, not students, so try replacing students with classmates | |
Re: well, first you would need to have actual processes, I suppose. could you just try and explain what exactly it is that you are trying to achieve? | |
Re: do you get an error message when you try to compile? if so, what is it? EDIT one 'error' I see: [Code=Java] public void setSeatsBooked(String seats) { this.seatsBooked = seatsBooked; } [/Code] should actually be [Code=Java] public void setSeatsBooked(int seats) { this.seatsBooked = seats; } [/Code] there you had two … | |
Re: you're closing your class and still adding methods and code, I presume | |
Re: [QUOTE=shean1488;1768793] I was alway wondering what kind of tasks you guys usually doing? I mean how does it work? [/QUOTE] writing software .. I'm afraid that's about as 'specific' I can be, since what kind of depends on the project you're on. if you start as a consultant, it's possible … | |
Re: how did you implement the switch? maybe you're doing a refresh of the entire page, while you only have to hide a part and set another to visible. | |
Re: or, if you mean you want to know how many instances are made from a certain object, use a static counter. | |
Re: jessa: a few points here: 1. if you have a question -> start a new thread 2. don't just pass your assignment on to us, show us what you have so far, as it is in no way our goal to do your homework for you, we'll just help you … | |
Re: I as Dantinkakkar already told you, we'll expect you to do a little effort yourself, before asking our help, especially for something that can be easily googled. for later reference though, I am willing to give you a [URL="http://translate.google.com/"]'Kewl link'[/URL] that will help you make any later posts a lot … | |
Re: well ... just took a quick look over it. it looks to me like all of that can be done using html, css and javascript/jquery, so what tools you'll need ... notepad to write the code (or any other text editor) and a browser to test your pages. | |
![]() | Re: why, or to what gain are you trying to do this? ![]() |
Re: JFrame or applet: do you want to write it for a browser, or a desktop application? the rest: check what the game 'does' what rules it has. I assume you'll have a number of CARDS, so write a Card class, give it a type (spade, diamonds, ...) and a value … | |
Re: bad in javascript? do you have experience in other technologies? javascript is not the only way to do so. start your function using the onclick, and use the getElement("elementId").getValue() methods to retrieve the values of your input fields. when you've completed your mathematical operation(s), just use getElement("elementID").setValue(resultOfCalculation) I'm not sure … | |
Re: well ... not sure what you're trying to do, but by your description: instead of having one single instance of your message (is that the Entity variable?) create either an Array of the type, or an ArrayList which takes elements of that type, and add to it, instead of overwriting. | |
Re: for your ball, write a getCenter() method, which returns the exact location of the center of the ball. for your bat, write a method that takes the result of that getCenter() method as parameter, and that returns true if that center + ( or - ) 50 would come into … | |
Re: yeah, you may want to give a bit more information. what kind of connection, what's the total error message, what code are you running, ... | |
![]() | Re: that's a bit little information to go on, but, do you actually have an Item selected? can you post the entire code, and the complete exception error message |
Re: depends.. are you talking about Java the 'cross-platform Object-Oriented programming language', or Java the coffee blend? if we are talking about the programming language: every single computer program 'out there' is written using a programming language, being it C, C++, Assembler, Java, Cobol, .Net, Visual Basic, ... how Java helps … | |
Re: you're not looking for a 'loop', you're looking for reusability of code. write the repeating code in a method, and the variables, the parts that differ, that are the arguments you pass as parameters each time you call the method. | |
Re: regex. you should be able to write a regex function taking everything between @ and .edu | |
Re: I don't understand your question. can you explain a bit more what you're trying to do? are you trying to get your code to ask you again for input after your diamond has been printed? | |
Re: what do you mean by: not correct for operator? | |
Re: "it doesn't work somehow" is a pretty vague description. can you be a bit more clear? for instance: I expect ... as output, but I get ... or: it doesn't compile and gives this error message or: it doesn't run and gives this error message .. | |
Re: you mean: an IDE? any half-decent google query would land you with links to dozens of them. if you really want to 'learn' java, start without them. programming without having the IDE auto-completion functions will allow you to actually learn the language better. | |
Re: that depends on your national law, but of course also on the materials you allow to be shared. for instance, if you add a filter that makes sure that copyrighted material can not be shared, or, in those cases that it passes the filter, can be blocked when detected, you'll … | |
Re: don't know what you've tried, but looks to me like your conversion would be a lot easier if you splitted all logic that's into your main method into methods. the only thing that has to be in your main method, is a call to the gui (even if that is … |
The End.