1,034 Posted Topics

Member Avatar for cdt1983

Of course there is, and there is many ways of doing this. [Code] x = 5; /loop //parse a string entered by a user if (inputedNumber < x || inputedNumber > x) { //inputedNumber = aNewValue } //end loop [/Code]

Member Avatar for cdt1983
0
117
Member Avatar for George2

I'm not sure I understand completely...So correct me if I'm wrong, when the user enters a specific key, such as "friends", you want to "spit" out the array corresponding to that array.

Member Avatar for George2
0
88
Member Avatar for server_crash

I plan on writing an app that will graph polynomial expressions. My question is, what should I draw the graph on? Should I just use the regular frame and use DrawLine(), or is there something like a bitmap, or canvas thing I should use?

Member Avatar for server_crash
0
100
Member Avatar for satimis

Hope you don't mind me suggesting one, but this tutorial worked great for me...It's a little old, but very good. [url]http://chortle.ccsu.ctstateu.edu/CS151/cs151java.html[/url]

Member Avatar for satimis
0
166
Member Avatar for OurNation

I rewrote it, but you really need to work on your conventions: indenting, and naming. [Code] import java.io.*; public class Slope { public static void main(String args [ ]) { double y2, y1, x2, x1; y2 =0; y1 =0; x2 =0; x1 =0; BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); try …

Member Avatar for OurNation
0
155
Member Avatar for Lost Chyld

I don't think you can use the break statement in for loops. I guess you would have to set the count variable to something greater than the ending condition in the loop, that way it won't loop anymore. [Code] for int(i=0; i<10; i++) { if (i=2) { i = 11; …

Member Avatar for server_crash
0
103
Member Avatar for PaulaS

I think there is some method that takes an image, and creates an array of pixels out of it: I think it's something like this: [Code] int x = getPixels(Image); [/Code]

Member Avatar for server_crash
0
107
Member Avatar for Velikiy

[QUOTE=Ceaser] It is a possibility that you formated over the Linux partition. [/QUOTE] This is most likely what's happend unless maybe you used something like partition magic to partition. This can sometimes cause it to boot directly into one OS and ignore the other.

Member Avatar for Paul.Esson
0
213
Member Avatar for BrownSuga

I'll help you with the System.outs to get rid of the bulk of the problem, but I am very sick right now, or else I would help you fix all of it. System.out.print("Cannot find specified item -" ' + item + '); should be something like this" System.out.print("Cannot find specified …

Member Avatar for BrownSuga
0
160
Member Avatar for freesoft_2000
Re: Undo

are you wanting to add it to the textfield? If so, all you have to do is create a document from the textfield.. import these: [Code] import javax.swing.undo.*; import javax.swing.event.*; import javax.swing.text.*; [/Code] add an UndoableEditListener create an UndoManager as an instance variable create a Document as an instance variable …

Member Avatar for freesoft_2000
0
118
Member Avatar for server_crash

For the AP Comp. Sci. exam, we have to read 150 pages on this stupid program, and my teacher is wanting us to read the teacher's manual of it on the side..Which is another 130 pages...Now, I have heard that the questions on that case study makes up less than …

Member Avatar for AlPhA
0
185
Member Avatar for jengels
Member Avatar for server_crash

I have a JMenu with some radio buttons...For some reason, when I click the stupid things, they won't do anything...and by that, I mean they want change their state to being clicked(as in the circle being filled)..It's like they are disabled...I'll post the snippets of code with them in it: …

Member Avatar for server_crash
0
144
Member Avatar for server_crash

Let's say I have two classes, Class1, and Class2..... Class2 creates and instance of Class1 and calls one of it's methods like this: [Code] Class 2 { Class1 c1 =new Class1(); c1.myMethod(); } [/Code] Now, that would work...But, could you have just the class variable instead of the class instance …

Member Avatar for server_crash
0
96
Member Avatar for Mooonky

[Code] drawOval(int x, int y, int width, int height) [/Code] Just use threads to increment the x and y value position at certain intervals.

Member Avatar for Banderson
0
2K
Member Avatar for Gink

I think you would run into accesibilty issues there. I don't think applet are allowed to do that.

Member Avatar for jwenting
0
94
Member Avatar for rickste_r

You can always set the foreground or background color of your panel or content pane...Or I think you could create a Font object.

Member Avatar for server_crash
0
64
Member Avatar for server_crash

I have the datasoure and drivers set up, but for some reason this code is not updating the database. [Code] import java.sql.*; public class TestCreateCoffeeTable { public TestCreateCoffeeTable() { } public static void main(String[] args) { try { String createStatement; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String dataSource = "jdbc:odbc:Coffeebreak"; Connection con = DriverManager.getConnection(dataSource); Statement …

Member Avatar for server_crash
0
142
Member Avatar for MrScruff

I wonder if this would work: Create one array with all the values you need, then create a gridlayout with the certain number of rows and columns you need and then append them to the container set to the grid layout

Member Avatar for MrScruff
0
101
Member Avatar for jenman77

You WON'T understand certain concept untill your very experienced with java. Polymorphism, inheritance, and other concepts like that aren't very difficult, but you just want grasp it starting out. I wouldn't even waste too much time looking at it, untill you have a good understanding of java, then it is …

Member Avatar for jwenting
0
188
Member Avatar for server_crash

I'm curious as to how many of you routinely use jdk 1.5 tigers added features, methods, api's and whatever. Or, do you just stick to 1.4?

Member Avatar for nanosani
0
172
Member Avatar for cdt1983

If you don't have to use the 'if' way, you could always throw them in an array and sort them int[] nums = {a,b,c,d,e}; Arrays.sort(nums); int x = nums.length; System.out.println(nums[0] + " " + nums[x]);

Member Avatar for Gink
0
105
Member Avatar for George2

I don't recall anything like that. I would either leave them, or remove them manually.

Member Avatar for George2
0
160
Member Avatar for George2

hmm. If I remember right, java doesn't support those file extensions. I think it supports weird ones like au, aiff, and stuff like that. But, I do think it supports .wav files. Maybe someone will correct me if I'm wrong

Member Avatar for George2
0
127
Member Avatar for rishiraj_bayerd
Member Avatar for server_crash

I know how to find a directory if I know the full path name of the directory I'm searching for..But, let's say I only know the directory name, and not the full path name..How can I find that directory on a users system? Is there some recursive function or looping …

Member Avatar for jwenting
0
86
Member Avatar for MrScruff

If you use an ArraList like jwenting suggested, you can use: [Code] Collections.sort(ArrayList); [/Code] You might could use that on a vector, but I doubt it. Never tried. Also, isn't there some way to use the comparator interface to sort?

Member Avatar for jwenting
0
98
Member Avatar for AQWst

Im curious, why do you create an instance of the class in each method? [Code] CurrencyConv2 a1 = new CurrencyConv2(); [/Code]

Member Avatar for AQWst
0
144
Member Avatar for matt_5104

[Code] int a = 5; int b = 7; if (a > b) { b += 1; } else { b -= 1; } [/Code] Is this what your talking about?

Member Avatar for pajac
0
161
Member Avatar for AQWst
Member Avatar for AQWst
0
237
Member Avatar for server_crash

Is it possible to update your programs information from other websites? I mean if you have like a stock program or currency program, the data changes everyday. So can you recieve updates from websites, and change this info? If so could you point me to a site that explains how, …

Member Avatar for server_crash
0
75
Member Avatar for grifflyn

I noticed that you didn't have an instance of the ArrayUtilities class in your first project. I don't have a jdk on this computer so I can't test it or I would. But to me that looks like the problem. You could do something like this: ArrayUtilities ar = new …

Member Avatar for grifflyn
0
206
Member Avatar for server_crash

Does anyone know how you could process an equation, or even get an equation with more than two operands? Right now, in my calculator, I can only have two operands, and I want to have more. Right here is what I have: [Code] import java.awt.*; import java.awt.event.*; import javax.swing.*; public …

Member Avatar for server_crash
0
831
Member Avatar for themetalmozart

[QUOTE=freesoft_2000]Hi everyone, You can try to google for them or you can try sun's official website. They have some pretty good tutorials over there Richard West[/QUOTE] Sun's website has some really good tutorials, but the website is huge and hard to sort through at times. Note: I'm not good at …

Member Avatar for Phaelax
0
148
Member Avatar for kharri5

I wonder if you'll have to do any bit shifting. hmm. I'll have to do some searching and see what I can find. I know I did this in vb.net(except I took regular numbers), but I can't remember the formula. I'll get back to ya.

Member Avatar for kharri5
0
192
Member Avatar for AQWst
Member Avatar for server_crash
0
506
Member Avatar for usha

[QUOTE=freesoft_2000] PS: Don't be bothered about what narue said, some people simple refuse to help others out but when they need help they expect others to help them out. [/QUOTE] I've seen it many times on here. You would think that some people would realize there is no need for …

Member Avatar for alc6379
-1
316
Member Avatar for server_crash

I have this simple calculator I just started on, and I'm having just a few problems. First of all, I don't know how to append text to a textfield. Maybe I would have to create a string buffere or something. Then, when the user clicks one of the buttons, the …

Member Avatar for server_crash
0
165
Member Avatar for server_crash

I've been trying to do this for weeks now, and can't seem to get it to work. I have a JTextPane called textArea2, and I have a variable called doc that gets the document from the textpane. I want to get the selected text but I can't get no code …

Member Avatar for server_crash
0
286
Member Avatar for Tekmaven

1. I've never done this so I'm not too clear on this. I think you have to set some kind of system property and then you can get properties of the console, and use escape sequences to clear console. public class Hello { public static void main(String[] args) { System.out.println("Hello"); …

Member Avatar for freesoft_2000
0
867
Member Avatar for server_crash

Does anyone know if I can use my linksys wireless g card on the linux platform? I don't see any linux files on my setup cd, nor is there any initial downloads for it that I know of.

Member Avatar for DMR
0
250
Member Avatar for freesoft_2000

You said none of the images were printing, how are you reading the file? I don't know if this will have anything to do with it, but it might :cheesy:

Member Avatar for server_crash
0
156
Member Avatar for mrfarukmiah

Run the network setup wizard on both computers. At least this is what I did, it's very easy, and it worked for me.

Member Avatar for server_crash
0
64
Member Avatar for beerworld

Do you have a java enabled browser? And it might be helpful to post your code to make sure there is no errors in it.

Member Avatar for server_crash
0
100
Member Avatar for jigvesh

that one class was not needed: [Code] import java.io.*; public class search { String str; int key,size,seaArr[]; public void getdata() { System.out.print("Enter how many data you want to enter : "); System.out.flush(); try{ BufferedReader obj=new BufferedReader(new InputStreamReader(System.in)); str=obj.readLine(); size=Integer.parseInt(str); seaArr=new int[size]; for(int i=0;i<size;i++) { System.out.print("Enter element at "+(i+1)+"th position : …

Member Avatar for jigvesh
0
163
Member Avatar for server_crash
Member Avatar for aeinstein
0
121
Member Avatar for server_crash
Member Avatar for server_crash
0
76
Member Avatar for server_crash

I have this code that is suppose to append text to a JTextPane, using the Document method insertString(). I can't seem to get the attribute argument right, so maybe one of you can point me in the right direction... Here is the one line of code giving me problems, just …

Member Avatar for server_crash
0
357
Member Avatar for server_crash

I have a method that counts the number of words in a JTextArea. It works pretty good, except for the fact it counts characters that's not letters as words(such as "!@#$" would be a word)... Here is the code that I have got so far(no erros, compiles and runs fine, …

Member Avatar for server_crash
0
201
Member Avatar for server_crash

I made a text editor with very basic funtionalities. I wrote it all in one class because I really wasn't sure what to put into other classes. Right now the code is pretty messy and I want to rewrite it. I was wondering if anyone could give me some input …

Member Avatar for server_crash
0
178

The End.