Package utils

Examples of utils.ReadFile


     * Creates new form AddNewWord
     */
    public RemoveWord() {
        initComponents();
       
        ReadFile reader = new ReadFile();
        ArrayList<String> wordList = reader.readFromFile("dictionary.txt");
        wordList.removeAll(Collections.singleton(null));
        RemoveWordTableModel model = new RemoveWordTableModel(wordList);
       
        wordsTable = new JTable(model);
       
View Full Code Here


        clearAllButton.setLocation(400, 350);
        clearAllButton.setText("Clear All");
    }
   
    public void loadData(){
        ReadFile reader = new ReadFile();
        highscores = reader.readFromFile("scores.txt");
        highscores.removeAll(Collections.singleton(null));
        System.out.println("highscores: " + highscores.size());
        System.out.println("highscores(0): " + highscores.get(0));
       
        player = new JLabel[highscores.size()];
View Full Code Here

        //Color textField = new Color(125, 67, 125);
        //userInput.setBackground(textField);
       
        //String compWord = "drunk";
       
        ReadFile reader = new ReadFile();
       
        ArrayList<String> allWords = reader.readFromFile("dictionary.txt");
        allWords.removeAll(Collections.singleton(null));
//        for(int i = 0; i < allWords.size(); i++) {
//            System.out.println("from main " + allWords.get(i));
//        }
        System.out.println("allWords.size() " + allWords.size());
View Full Code Here

     * normal string array.
     * This array is then sent to the WriteToFile class, where the dictionary
     * file is truncated and rewritten.
     */
    public boolean removeWord(String word) {
        ReadFile reader = new ReadFile();
        WriteToFile writer = new WriteToFile();
        ArrayList<String> allWords = new ArrayList<String>();
        boolean wordRemoved = false;
        String path = "dictionary.txt";
       
        allWords = reader.readFromFile(path);
        allWords.removeAll(Collections.singleton(null));
       
       
        System.out.println("old size: " + allWords.size());
       
View Full Code Here

TOP

Related Classes of utils.ReadFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.