Search Results

Search found 2 results on 1 pages for 'razshan'.

Page 1/1 | 1 

  • Where to get the import ij.* package from?

    - by razshan
    What do I need to do to successfully the import ij package? I get an error: ITCN_.java:1: package ij does not exist The imports are: import ij.*; import ij.io.*; import ij.gui.*; import ij.process.*; import ij.measure.*; import ij.plugin.*; import ij.plugin.frame.*; import ij.plugin.filter.PlugInFilter; import java.io.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.lang.*; import java.text.*;

    Read the article

  • Reading lines of data from text files using java

    - by razshan
    I have a text file with x amount of lines. each line holds a integer number. When the user clicks a button, an action is performed via actionlistener where it should list all the values as displayed on the text file. However, right now I have linenum set to 10 implying I already told the code that just work with 10 lines of the text file. So, if my text file has only 3 rows/lines of data...it will list those lines and for rest of the other 7 lines, it will spit out "null". I recall there is a way to use ellipsis to let the program know that you don't know the exact value but at the end it calculates it based on the given information. Where my given information will the number of lines with numbers(data). Below is part of the code. private class thehandler implements ActionListener{ public void actionPerformed(ActionEvent event){ BufferedReader inputFile=null; try { FileReader freader =new FileReader("Data.txt"); inputFile = new BufferedReader(freader); String MAP = ""; int linenum=10; while(linenum > 0) { linenum=linenum-1; MAP = inputFile.readLine();//read the next line until the specfic line is found System.out.println(MAP); } } catch( Exception y ) { y.printStackTrace(); } }}

    Read the article

1