public static TableModel loadTableFromText(String fileName, Map<Integer, Double> input,
            Map<Integer, Double> input2, double bobot) {
        int max = 0;
        List<Result> resultList = new ArrayList<Result>();
        Iterator it = input.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry pairs = (Map.Entry) it.next();
            int key = Integer.parseInt(pairs.getKey().toString());
            if (max < key) {
                max = key;
            }
        }

        Iterator it2 = input2.entrySet().iterator();
        while (it2.hasNext()) {
            Map.Entry pairs = (Map.Entry) it2.next();
            int key = Integer.parseInt(pairs.getKey().toString());
            if (max < key) {
                max = key;
            }
        }

        for (int i = 0; i <= max; i++) {
            double input1Value = input.get(i) == null ? 0 : input.get(i);
            double input2Value = input2.get(i) == null ? 0 : input2.get(i);
            if (input1Value == 0.0 && input2Value == 0.0) continue;
            resultList.add(new Result(i, (input1Value * bobot) + (input2Value * (1.0 - bobot))));
        }
        
        createTextFile(fileName + "-" + bobot + ".txt", resultList);
        return new TabelModelResult(resultList);
    }