Okay, so I have a ListView populated by an Array, which is populated by a text file. I also have 3 TextBoxes which are changed to different values in multiple Arrays using the Selected Index. My problem occurs when reloading the ListView after saving the text file. The values from the TextBoxes are used in the text file. What happens is, the index is being changed since the ListView is being cleared, which fires the changed method. Since the ListView is empty now, the Selected Index is -1 which is why I get an Array Index Out Of Bounds Exception …

Member Avatar
Member Avatar
+0 forum 1

Using Visual Basic 10, and I am trying to identify min/max statistics and display the results. My calculations are working, but the display is not (line 68 & 80). With the way the code is written now, I don't get the error but my results are displayed as "The minimum monthly rainfall was *correct result* ("*g*"). "g" should be the month that corresponds to the minimum monthly rainfall. The same issue occurs on the maximum display. The line was initially written as *lblMinMonthly.Text = ("The minimum monthly rainfall was " & intMinRainfall.ToString() & "(" & strMonths(Me.intCount) & ")")* but received …

Member Avatar
Member Avatar
+0 forum 4

So my readPoly fct assigns the values i want to my dynamic array, but when the fct send Polynomial p back to main to be assigned to a and b(fct called twice) the first value of the array is set to 0. I've output the array inside readPoly and it gives valid values, then as soon as it is passed to main i output again and i have lost a->coeffs[0] and b->coeffs[0]! Any help would be greatly appreciated! Here's my whole code so far, though the error i believe is between readPoly(Polynomial* p) and the main()fct.It could be the outputPoly …

Member Avatar
Member Avatar
+0 forum 2

Hello, It appears that I'm having a slight problem with a pesky ArrayIndexOutOfBoundsException when trying to assign a value to an array embedded within an object. I *think* it's because the array hasn't been instantiated before I try to add values to it's index. The purpose of the program is to generate an array of random numbers within each object of the population. So, in the following case there will be 10 objects each with their own 8 random number sequences. Firstly, here is a code snippet from my main class. int a = 10 int b = 8 Random …

Member Avatar
Member Avatar
+0 forum 2

i am just trying to populate this array with some information. i have no idea why, but i am getting: java.lang.ArrayIndexOutOfBoundsException: 0 im probably just stupid 0_o... but, here is my code: private boolean populated = false; private int blockList[][] = {}; public void update(){ if(populated == false){ int a = 0; for(int i = 0; i < 200; i++){ for(int j = 0; j < 50; j++){ blockList[a][0] = i; blockList[a][1] = j; blockList[a][2] = 1; a++; } } populated = true; } } all input, even if not direct help, is very much appreciated.

Member Avatar
Member Avatar
+0 forum 4

![Hi Daniweb forum, I've come across a problem in my panel_mousedown event. Now I initially have 3 pictureboxes Painted on panel1, and each picturebox Control is set to Visible = false; and only become visible again when using this code: private void panel1_MouseDown(object sender, MouseEventArgs e) { if (picturebox1.Bounds.Contains(e.Location) && !picturebox1.Visible) { picturebox1.Show(); picturebox2.Hide(); picturebox3.Hide(); } if (picturebox2.Bounds.Contains(e.Location) && !picturebox2.Visible) { picturebox1.Hide(); picturebox2.Show(); picturebox3.Hide(); } if (picturebox3.Bounds.Contains(e.Location) && !picturebox3.Visible) { picturebox1.Hide(); picturebox2.Hide(); picturebox3.Show(); } The problem I have faced while using this code is that when there are overlapping picturebox images, when I click one it may click the image …

Member Avatar
+0 forum 0

I got error of ArrayIndexOutOfBounds Exception in following code. Please help me to how to solve the error.I also used String tokenizer class. import java.io.*; import java.lang.*; import java.util.Arrays; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.StringTokenizer; public class CSV{ public static void main(String[] args) { // TODO Auto-generated method stub String fileName="C:/Users/JAL/Desktop/dataset.csv"; try { BufferedReader br = new BufferedReader( new FileReader(fileName)); String strLine = null; StringTokenizer st = null; int lineNumber = 0, tokenNumber = 0; int row = 0; int col = 0; String [][] numbers = new String[100][100]; while( (fileName = …

Member Avatar
Member Avatar
+0 forum 7

The End.