203 Posted Topics

Member Avatar for ddanbe

Hello, ddanbe. I was playing with your code ... I'm not sure, that this is what are you looking for: [code=c#] this.AutoScroll = true; if (ColumnCount > cMaxCol) { CC = cMaxCol; RC = this.RowCount; ColScr = 0; } else if (RowCount > cMaxRow) { CC = this.ColumnCount; RC = …

Member Avatar for LizR
0
114
Member Avatar for jrdark13

Just to add: you can use the alternative way (a bit longer, but still can be useful some day :) ). For the case, if you don't want to interrupt your prog when the user inputs the incorrect value. You can design a method, using [url=http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html]Class Character[/url]. This class contains …

Member Avatar for Antenka
0
139
Member Avatar for shazzy99

Hello, gallian99. I haven't heard about such standard functions :) I can offer two alternative ways for you: 1. Using reference types (like ArrayList). You'll able to add elements dynamically and get the actual size of your array. 2. Create your own structure/class, that will contain your array, the full …

Member Avatar for Rashakil Fol
0
178
Member Avatar for AllenB

Hello, Allen. You close your [B]BufferedWriter bw[/B] in the cycle (when you are writing data into the file). So in the best case you'll have an empty file ... in worst - an exception. Just take it out of the cycle.

Member Avatar for Antenka
0
170
Member Avatar for viswa_007

This should help you: [url=http://www.codeproject.com/KB/dialog/mdiclientcontroller.aspx#Hiding the Scrollbars]Getting a "Handle" on the MDI Client[/url]

Member Avatar for Antenka
0
96
Member Avatar for shers

[QUOTE] x = 1 N1 = x to x + 15 x = x + 15 N2 = x to x +15 ... [/QUOTE] The 16th file will be displayed on N1 and on N2. I suppose you need this correction: [inlinecode] x = [COLOR="Red"]0[/COLOR] N1 = x [COLOR="Red"]+ 1[/COLOR] …

Member Avatar for LizR
0
185
Member Avatar for shazzy99

how about looking in MSDN for [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.combobox.aspx]ComboBox Class[/url]?

Member Avatar for LizR
0
139
Member Avatar for gouki2005

in your case it doesn't matter, which way you use to add 1. I suppose that you was talking about "+=" operator? Let's see: 1. [code=c#]Empleados.numeroemp++;[/code] increasing numeroemp by 1. 2. [code=c#]Empleados.numeroemp += 1;[/code] which is the short version of this: [code=c#]Empleados.numeroemp = Empleados.numeroemp + 1;[/code] 3. [code=c#]Empleados.numeroemp = + …

Member Avatar for BlackSun
0
88
Member Avatar for shazzy99
Member Avatar for shazzy99
0
122
Member Avatar for cVz

It also works proper with me, but have some thing, that you should look at: 1. You check Parent_Name 2 times. And second one is inside the first one. It looks like question: "Are you really sure that (Parent_Name != null)" ;P [code=c#] treeView1.Nodes.Clear(); if (Parent_Name != null) { [/code] …

Member Avatar for LizR
0
355
Member Avatar for cVz

Hello, cVz. StreamReader.ReadToEnd method has this signature (taken from MSDN): [QUOTE]public override string ReadToEnd()[/QUOTE] The returning type is [B]string[/B]. Am I misunderstood something?

Member Avatar for Antenka
0
179
Member Avatar for jimchong

What are you trying to do here: [code=c#] SqlConnection conn = new SqlConnection(); [/code] Here is an example for you: [url=http://www.jonasjohn.de/snippets/csharp/sql-connection-example.htm]SQL connection example[/url]

Member Avatar for LizR
0
120
Member Avatar for l_03

I hope, this may help you: [url=http://books.google.com.ua/books?id=UPhrjggcTwwC&pg=PA355&lpg=PA355&dq=java+linkedstack+isfull&source=bl&ots=mKcXZrHuAB&sig=9UfF5qRYyjliq25ONNmqm-SZQxo&hl=ru&sa=X&oi=book_result&resnum=1&ct=result#PPA355,M1]Object-Oriented Data Structures Using Java[/url]

Member Avatar for ~s.o.s~
0
128
Member Avatar for hypocrisy

Hello, hypocrisy. For keeping distinct numbers, you can use, for example [url=http://java.sun.com/j2se/1.5.0/docs/api/java/util/ArrayList.html]Class ArrayList<E>[/url]. This class contains method to check, if the list already contains given element.

Member Avatar for masijade
0
193
Member Avatar for javaman2

1. Are you sure, that your example is correct [icode]2,15,4 which = 2,3,4[/icode] ... and not [B]16 = 3[/B]? 2. You don't check the case, when you get, for example 4,2,3. In that case your (x == 2) and (ex == 1), but it is still Straight. P.S. If the …

Member Avatar for hypocrisy
0
110
Member Avatar for John G

This error caused by whitespace between '_' and 'minTemperature' here: [code=java]_ minTemperature= minTemperature;[/code]

Member Avatar for Antenka
0
116
Member Avatar for shazzy99

You can use [B]foreach[/B] cycle. E.g. like this: [code=c#] foreach(string fileName f in Directory.GetFiles("SomeDirectory")) { ... } [/code]

Member Avatar for shazzy99
0
9K
Member Avatar for shazzy99

Hello, gallian99. This may help you: [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx]OpenFileDialog Class[/url] - that for case if you're not dropped it on your form. and this: [url=http://msdn.microsoft.com/en-us/library/aa984392(VS.71).aspx]Opening Files Using the OpenFileDialog Component[/url] - if it is on your form.

Member Avatar for LizR
0
285
Member Avatar for javaman2

Hello, javaman2. You have mistake in logic here: [code=java] if(((x==1)&&(cardSuit==0))&&((x==2)&&(cardSuit==0) )&&((x==3)&&(cardSuit==0))) [/code] All that expression contains only '&&' condition. So if a bit transform it, you are telling: do something, if that condition turns true [B](x==1) and (x==2) and (x==3) .... [/B] Also there are same mistakes in similar expressions. …

Member Avatar for puneetkay
0
90
Member Avatar for llemes4011

Hello, llemes4011. Hm ... interesting task. Your problem here: [code=java] // If the number already appears in the row and the column, change the booleans to false to check again if(number.equals(theBoard[i][currentColumn])) legal[0]=false; if(number.equals(theBoard[currentRow][i])) legal[1]=false; [/code] Here you should check, whether your element is already appears in row and column (from …

Member Avatar for llemes4011
0
182
Member Avatar for roadToNowhere

Just to add Ezzaral: you have interesting situation: 1. You declare a variable: [code=java]private static newTEST newTest;[/code] 2. Then you call this: [code=java]TUImain tui = new TUImain(newTest);[/code] what means, that you call the constructor and pass this variable into it as parameter. 3. In constructor you do this: [code=java]this.newTest = …

Member Avatar for Antenka
0
101
Member Avatar for roadToNowhere

or one more example placed here: [url]http://www.exampledepot.com/egs/java.io/GetFiles.html[/url]

Member Avatar for roadToNowhere
0
110
Member Avatar for amgupt01

Hello, amgupt01 You can use this: [code=java] PrintWriter writer =new PrintWriter("yourfile"); writer.println("Line to print"); [/code]

Member Avatar for gprest
0
176
Member Avatar for mrjoli021

Hello, mrjoli021 I hope the Sun description of Runtime class help you: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html[/url]

Member Avatar for darkagn
0
164
Member Avatar for shubhang

Hello, shubhang. You've asked: [QUOTE]pls help me with the logic of displaying it on the same line.[/QUOTE] Here is a few articles about positioning cursor in console application: [url]http://mindprod.com/jgloss/console.html[/url] [url]http://en.allexperts.com/q/Java-1046/java-positioning-cursor-console.htm[/url] [url]http://www.rgagnon.com/javadetails/java-0469.html[/url] Hope it can help :)

Member Avatar for Antenka
0
321
Member Avatar for sandawg

Hello, Sandawg. Here is your mistake: you trying to take element of array, that not exists. you should use this [code=java] public static void printArray(int count) { for (int i = 0; i<count; i++ ) { System.out.print(pName[i]); ... } [/code] Also there is a couple recommendations to you (including about …

Member Avatar for Antenka
0
121
Member Avatar for schmidty169

beforehand, sorry for my english... :) I have some advices for you: 1. You have a lot of repeating code in your program. You should take out it to a method(s) and then call it... (also in doneBtn_Click method you have switch operator, that no matter what do this: amountTxtBx.Text …

Member Avatar for schmidty169
0
269
Member Avatar for zatin

Here is link to understand Comparable Interface: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Comparable.html[/url] And here is a little help on binary search: [url]http://leepoint.net/notes-java/algorithms/searching/binarysearch.html[/url]

Member Avatar for ~s.o.s~
0
1K
Member Avatar for Laidler
Member Avatar for Laidler
0
174
Member Avatar for Catherinedally

beforehand, sorry for my english... for example, you can create a class Student where place info about student (such as ID, Name, Result1, Result2). To create an array of students, you can use (for example) ArrayList. It accept to add object in collection. I will appear you to list array. …

Member Avatar for coolkeg
0
131
Member Avatar for cproud21

Here some links, that can solve your problem: [url]http://www.hostitwise.com/java/japplet.html[/url] [url]http://www.roseindia.net/java/example/java/applet/[/url] and here is alternative decision (if you interested): [url]http://www.jython.org/applets/coordinates.html[/url] :)

Member Avatar for Antenka
0
142
Member Avatar for KPS
Member Avatar for Antenka
0
118
Member Avatar for poggie

Hello, beforehand, sorry for my english... You can read your data into String, the split it by " ". And you'll have an array of symbols. To print it, you can use 2 cycles: (1st - from 0 to arrayLength; 2nd- from 0 to (columCount and arrayLength if you can …

Member Avatar for stultuske
0
144
Member Avatar for MRafeie

Looke here: [url]http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=624210&SiteID=1[/url]

Member Avatar for MRafeie
0
1K
Member Avatar for deven1974

Hello, deven1974 Lets start: 1. Illegal use of data and datatypes: [code=java] public void remove(E data) { E.data = null; if (head != null) temp = head.data; head = head.next; return temp; } [/code] It is equal, if you write this [code=java] String s; String.s = null; [/code] 2. You …

Member Avatar for Antenka
0
320
Member Avatar for cbickle

First: startSky != "snowy" and startSky != "sunny". Use method equals to campare stings. Maybe it will be better for you to use enum instead strings "sunny", "snowy" etc. In setSky method, when you get an error, you don't set the skyCondition.

Member Avatar for Antenka
0
901
Member Avatar for shubhang

It doesn't work because you compare strings using "==". Try this: [code=java] if(sval.equals(arr[pos])) [/code]

Member Avatar for Antenka
0
183
Member Avatar for lone_emu

Hello, lone_emu: At first, to use your static methods, you don't have to create an object of class Palindrome. So this: [code=java] Palindrome pal = new Palindrome(); [/code] is not wanted here. To replace chars in the string (not using replace function) you can convert your string to char array, …

Member Avatar for Antenka
0
616
Member Avatar for alip15379

Here is a lot of information about binary trees with code eaxamples: [url]http://cslibrary.stanford.edu/110/BinaryTrees.html[/url] [url]http://www.java-tips.org/java-se-tips/java.lang/binary-search-tree-implementation-in-java.html[/url] [url]http://www.cs.mcgill.ca/~cs251/OldCourses/1997/topic9/[/url] and here about spell checking using binary trees: [url]http://www.cs.uga.edu/~gtb/1302/Project6/[/url] [url]http://oopweb.com/Algorithms/Documents/PLDS210/Volume/opt_bin.html[/url]

Member Avatar for Antenka
0
180
Member Avatar for shubhang

Here is part of description of this function, given by java help: public boolean renameTo([B]File[/B] dest) It asks a File as parameter, but you give String to it.

Member Avatar for bondo
0
170
Member Avatar for 00matt

Correct me, if I'm wrong: 1. You creating new "clock" and setting it to 0. [code=java] Time application = new Time(); application.TimeTest(0, 0, 0); [/code] 2. Then while setting the hours creating 2 more clocks. [code=java] Time application2 = new Time(); application2.setHours(input.nextInt()); [/code] and [code=java] Time app = new Time(); …

Member Avatar for jasimp
0
146
Member Avatar for carlcarman

Here is something, that can help you: [url]http://www.java2s.com/Code/JavaAPI/java.util/ScanneruseDelimiterStringpattern.htm[/url]

Member Avatar for carlcarman
0
160
Member Avatar for NEEDJAVA

Here is something: Introduction to the JavaMail API: [url]http://archive.devx.com/upload/free/bkchapters/prowap/40441303.asp[/url] and here you can find code, provided by Sun: [url]http://java.sun.com/products/javamail/downloads/[/url]

Member Avatar for Antenka
0
369
Member Avatar for Antenka

Hello everyone, beforehand, sorry for my english... I have to do client - server application. They must interact, using classes URL, URLConnection. I understand, how to send data to server. But I can not realize server work. The common algorithm of server is: 1. Start. 2. Wait for connection. 3. …

Member Avatar for Antenka
0
203
Member Avatar for l_03

You are compering 2 different types String accountNum and int accountNumber[0]. This is interesting, that you run it without troubles :) As I understand, it must be like that: f(accountNum2==bank.accountNumber[0])

Member Avatar for l_03
0
113
Member Avatar for lich

Beforehand, sorry for my english... The || - is short version of |. I.e. if you have simple condition like this: (a||b) then, there is no difference, what operator to use. In case with complex condition: ((a==b)||(c==d)||(e==f)) will be difference. The || operator will be checking the conditions, untill it …

Member Avatar for ddanbe
0
194
Member Avatar for xorl

How about splitting like this: string[] s1 = s.Split(new string[]{".mp3"} ,StringSplitOptions.RemoveEmptyEntries); and then Split('-') ?

Member Avatar for xorl
0
174
Member Avatar for BestJewSinceJC

Beforehand I'm sorry for my English... I don't know any way to dynamically create variable, but I can offer some alternatives: 1. Use Dictionary 2. Create class variable dynamicly

Member Avatar for ~s.o.s~
0
199
Member Avatar for Clawsy

Don't know, how fix it, but I found something to turn off function, that calls the exception (and a little info about that) ... [url]http://msdn.microsoft.com/en-us/library/d21c150d.aspx[/url]

Member Avatar for Clawsy
0
411
Member Avatar for mandrake747

The End.