195 Posted Topics
Re: the String.format() method can definitly save you a lot of manual work with this. read [URL="http://www.rgagnon.com/javadetails/java-0463.html"]this[/URL] article,it shows exactly what you want to do! :) just because i realize the article above doesn't explain what is being done much , heres a little quote to clarify whats going on : … | |
Re: well if you want to change comboboxes items without having to postback , your gonna have to change them with javascript. if you really do not want to rely on javascript , then you can manage your postbacks with querystring, Session variables , or even cookies but that would be … | |
Re: the parts arent missing, they are just black on black! | |
Re: try with border instead of outline, worked for me in chrome | |
Re: the logic is flawed to start with, the for should never loop from 0 to the size of the employee array, correction int array for the moment. it should loop from 0 to the number of employees you would like to create at a time. Even tho standard payroll programs … | |
Re: well if the first 2 System.out.println() dont launch errors than i would try being consistant and using "System." on the third also. | |
Re: simply change your while condition, so that instead, you do the rs.next() in a if, so if .next returns false then you can launch say a JOption pane in the else section. then after the whole process lauch a confirm dialog and loop the while on the dialog result [CODE] … | |
Re: also, dont use the user's name as a unique identifier for your profiles nor for your pictures. use auto incremented numbers or Unique usernames. | |
Re: what is your question? why are you stuck, what is not working or what are you trying to implement next? | |
Re: [CODE] public String name(){ this.name = name; System.out.println("Please Enter Name"); return this.name; } [/CODE] all your setter method are wrong, explain to me why and ill help you fix them :D | |
Re: ive seen a thread about the same kind of problem go by on thsi very forum earlier this week, let me find it and refer it to you. you will not need any other software, just 3-4 extra lines of code. | |
Re: indeed if you are trying to get multiple inputs at once from a user, the JOptionPane can't help you. you will want to create a class and extend JFrame from it, then Initialize your components and set your layout. You will be using many components to build your form, more … | |
Re: it may be worth noting that while you are correctly calculating the area for a triangle, you have the wrong formula down for squares. now as for the myShapes array scope, the instructions suggest that the array will be declared as a global variable in the Drawer class, any object … | |
Re: it's not completly piracy proof but you could play with registry and like Dean said hardware keys. i remember having a file that would modify the registry on my computer so that "Soldat" some 2d worms like shooting game would think im a registered user instead of free user. And … | |
Re: vb definitly uses & instead of + to concatenate so you've got that right as far as why the first one works but the second doesnt that falls out of my expertise, can't help | |
Re: you were close tho, you can use "||" which is OR , "|" would work too but "||" is more efficient, because if the first condition is true then it knows it makes no diference to check the second, where you got it wrong is you gotta give full conditions … | |
Re: [QUOTE] setCaretPosition public void setCaretPosition(int position) [INDENT]Sets the position of the text insertion caret for the TextComponent. Note that the caret tracks change, so this may move if the underlying text of the component is changed. If the document is null, does nothing. The position must be between 0 and … | |
Re: [QUOTE=dantinkakkar;1764957]What you're looking at is a good bit of JavaScript work. You'll need to trim the string from the '@' part, and put the rest, to rest. I really don't know how you are going to find the name of the college exactly, though you can always create a database … | |
Re: there is one closing bracket missing just before "if(A.contains("Cold"))" to close the "if(A.contains("Hot"))" , and another closing bracket missing at the end to close the class | |
Re: [QUOTE]you can help me for write it program.[/QUOTE] No. We can help you understand what the errors are in the program that you write. | |
Re: this is how i got my images the last time i had to do that, theres plenty of ways to do it, i think i remember early classes teaching to use ImageIcon instead of Images and setting the icon of the component instead of drawing an image, but whatever way … | |
Re: this isn't printing out "<<<all tails>>>" nor "<<<all heads>>>" and not keeping track of the number of times both these events happen. | |
Re: isMotherOf() is placed inside the elephant class, there is more than likely a global variable there called name. so from isMotherOf(), you call e.getMother() which is return the name of e, you want to compare it with the name of the current object, the one that is calling isMotherOf(), you … | |
Re: Both your ways work, even tho James is better than datin's. the problem is that the OP wants to use the StringTokenizer class for this. [CODE] String s = "one two three four five six seven eight nine ten eleven twelve thirteen"; StringTokenizer st = new StringTokenizer(s); System.out.println("The string has … | |
Re: is this a snippet or you have a question? | |
Re: can you extend on the desired behavior? because i can see what your method does, and the code seems good, but it does not look like it does what you would want it to do correct? you say [QUOTE]if I input 1 it is changed to 0 and vice versa[/QUOTE], … | |
Re: [QUOTE]By the way, please correct every mistake in my project . Thanks ^^.[/QUOTE] made my day :D | |
| |
Re: to do what you want to do, you would need a second array that is bigger so that you can transfer lets say 3 numbers from the original array and then manually add a comma, rince and repeat. but adding the comma where they belong in the original would cause … | |
Re: you will have to launch the JFrame in a different thread if you want the progress bar to fill and the table to fill at the "same time", otherwise your program is gonna do one then the other. I haven't played with Threads in a bit but i can advise … | |
Re: This is the third thread about this site you post, and the second out of three where you directly ask for code to be given to you. I know you are not making any money from this site since its charity according to what you said previously, but we are … | |
Re: have you tried a <style> tag instead of directly putting the hack inline? | |
Re: can you elaborate a bit on what the error message is if there is an error, where it happens, whats the output? did you try setting a breakpoint on that if at line 22 and seeing what values are being compared and if you ever enter that if statement? | |
Re: quickly what comes to my mind as a simple work arround would be an "other" option in your select that triggers some javascript when selected/deselected to show/hide a textbox on the side. | |
Re: this thread really should be closed, the original poster never came back after he wrote this ONE non-sense post, and its been almost 3 months :o Im absolutly sure our time can be better spent than bumping this kind of thread! | |
We have all been there, you have a centered site and some pages have enough content to fill the screen while some don't. So when you move back and forth between one that does and one that doesn't you see a small jump happen. Here is a small css fix … | |
Re: hey, please be more specific about the errors you are getting... also your article seems nice and all but in case you would like to compare diferent methods of doing css-only menus i found this today: [URL="http://meyerweb.com/eric/css/edge/menus/demo.html"]http://meyerweb.com/eric/css/edge/menus/demo.html[/URL] , perhaps this site would point out something the first one missed, i … | |
Re: if i understood correctly what you are trying to do, here is the simple css you can add to make it happen (result shown in attached file) [CODE] #marquee{ margin:50px 0 60px 0; position: relative; } #logo2{ position: absolute; z-index: 1; } [/CODE] | |
Re: You would probably have more luck with this question in the Game Developpement forum, now as far as scripting goes I can't provide much help but when i did learn some lua for world of warcraft addons, it was mainly for gui changes. I do not know if other games … | |
Re: jsut declare a different css class or id for the div on the left edge, the div on the right edge and the divs on the inside, float them all left, set the margins like this : [CODE] #leftfeature{ margin:0 15px 0 0; } .middlefeatures{ margin:0 15px 0 15px; } … | |
Re: in your html, try putting all the image tags on the same line, in the markup every line return is gonna input a small white space between inline elements. let me know if this works. | |
Re: [CODE] static void Main() { try { //run application }catch(Exception e){ MessageBox.Show("This Exception was not handled : " + e.Message); //or lauchn error sending program with details from e } } [/CODE] | |
Re: what is gonna be the diference between the 1 variable example and 3 variable example? will you need to repeat the 1 variable technique on each of the 3 variables? Or you need to know if var1 is divisible by var 2 or something like that? it is not very … | |
Re: hey, i am no web design expert yet but i keep myself busy through projects and reading, in my opinion standards are key, and here are some interesting sites about web design standard practices and blogs. [URL="http://www.alistapart.com/"]http://www.alistapart.com/[/URL] [URL="http://www.positioniseverything.net/"]http://www.positioniseverything.net/[/URL] [URL="http://www.webstandards.org/"]http://www.webstandards.org/[/URL] keep an objective mind while reading from the internet, theres always … | |
Re: hey i actually had to do a hangman game recently! here is a little snippet of code that was in my overwritten paint method, note that i had a multiplayer option so i made them choose a character from the characters of FF1 on nes so thats why i use … | |
Re: [URL="http://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=embed+pdf"]http://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=embed+pdf[/URL] | |
Hello, im trying to create a "gradient" border so within my container div i have the content div that takes lets say 590px out of the containers 600px. and another div next to it that takes the remaining 10px. as i add content to the content div its height expends … | |
Re: [QUOTE=stultuske;1747335]and as for printing lines in a JOptionPane, you can "format" your String by "/n" to start a new line. if you do have to print all given numbers and are not allowed to put them into a String, I think you will be needing an array, List or Collection.[/QUOTE] … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/system.object.tostring.aspx"]toString[/URL] is a method from the Object class. every class inherits at some point of the Object class. If you do not over write the method in your new class, then it moves on to the next definition available... in the events that your class does not extend anything or … | |
Re: i see a lot of problems in your main : [CODE] public class TestShoppingCart { public static void main(String [] args){ //first i'd create an array of carts not 2 seperatly named carts (ill come back to this a bit lower) ShoppingCart newCartOne = new ShoppingCart(totalcost); //totalcost doesnt exist in … |
The End.