Click here to Skip to main content
15,901,001 members
Home / Discussions / Java
   

Java

 
GeneralRe: Is there any way to convert a word document into PDF using openoffice and JOD convertor : without installation of OpenOffice ? Pin
fly90423-Jul-09 3:44
fly90423-Jul-09 3:44 
GeneralRe: Is there any way to convert a word document into PDF using openoffice and JOD convertor : without installation of OpenOffice ? Pin
AshishAshish23-Jul-09 19:18
AshishAshish23-Jul-09 19:18 
Questionweb services Pin
benjamin yap20-Jul-09 3:22
benjamin yap20-Jul-09 3:22 
AnswerRe: web services Pin
Marc Firth21-Jul-09 0:09
Marc Firth21-Jul-09 0:09 
QuestionTwo Class Files and can't find each other Pin
alonchap19-Jul-09 23:42
alonchap19-Jul-09 23:42 
AnswerRe: Two Class Files and can't find each other Pin
alonchap20-Jul-09 1:22
alonchap20-Jul-09 1:22 
AnswerRe: Two Class Files and can't find each other Pin
Kujtim Hyseni24-Jul-09 5:38
Kujtim Hyseni24-Jul-09 5:38 
QuestionArraylist Pin
kyosugi19-Jul-09 19:29
kyosugi19-Jul-09 19:29 
I am doing a micro video application and am experiencing problems with my arraylist.
I have 2 separate frame. One is ListGameFrame and the other ListVideoFrame. When I add new games to the ListGameFrame and selects the ListGame option to view, I will also see my items from the videos section.

This is my coding for the ListGameFrame for adding games.

public void addGamesToList(ArrayList<Item> items)
    {
        // Clear any existing rows from the table
        this.clearDataFromTable();

        // For each game in the arraylist, add a row to table
        for (Item i : items)
        {
            String GameID = i.getItemId();
            String GameName = i.getTitle();
  

            String[] rowData = {GameID,GameName};
            ((DefaultTableModel)tblGames.getModel()).addRow(rowData);
        }
    }


And this my coding for viewing the list of games via a class call VideoManager.

private static void readGameObjects()
    {
        // Create an ObjectInputStream to read data (from game file)
        ObjectInputStream in = openObjectInputFile(gameFileName);
        if (in == null) // Nothing to read
            return;

        try {
            Item i = (Item)in.readObject();

            // While there are game objects to read...
            while (i != null)
            {
                // Add object to game arraylist
                items.add(i);
                i = (Item)in.readObject();
            }
        } catch (EOFException e) {} // Do nothing if EOF reached
        catch (IOException e)
        {
            System.out.println(e.getMessage());
            e.printStackTrace();
            System.out.println("Error in reading customer file");

        } catch (ClassNotFoundException e)
        {
            System.out.println(e.getMessage());
            e.printStackTrace();
            System.out.println("Error in file format: Customer file");
        } finally
        {
            try {
                    // Close the file
                    in.close();
            } catch (IOException e)
            {
                System.out.println(e.getMessage());
                e.printStackTrace();
            }
        }
    }

Sorry for the long codes as I do not know how to simplfy the problem I am facing now.
May I know if there is any specific problems in my coding which results the game list to also show the video list?
AnswerRe: Arraylist Pin
Rajdeep.NET20-Jul-09 7:02
Rajdeep.NET20-Jul-09 7:02 
GeneralRe: Arraylist Pin
fly90420-Jul-09 11:19
fly90420-Jul-09 11:19 
RantRe: Arraylist Pin
Nagy Vilmos21-Jul-09 5:33
professionalNagy Vilmos21-Jul-09 5:33 
GeneralRe: Arraylist [modified] Pin
EliottA22-Jul-09 6:05
EliottA22-Jul-09 6:05 
GeneralRe: Arraylist Pin
Nagy Vilmos22-Jul-09 6:09
professionalNagy Vilmos22-Jul-09 6:09 
AnswerRe: Arraylist Pin
fly90420-Jul-09 11:12
fly90420-Jul-09 11:12 
QuestionCan anybody tell me the difference between J2EE, J2SE, J2ME. Pin
GeetaW17-Jul-09 5:18
GeetaW17-Jul-09 5:18 
AnswerRe: Can anybody tell me the difference between J2EE, J2SE, J2ME. Pin
Nagy Vilmos17-Jul-09 5:42
professionalNagy Vilmos17-Jul-09 5:42 
GeneralRe: Can anybody tell me the difference between J2EE, J2SE, J2ME. Pin
mypicturefaded17-Jul-09 6:13
mypicturefaded17-Jul-09 6:13 
GeneralRe: Can anybody tell me the difference between J2EE, J2SE, J2ME. Pin
Nagy Vilmos20-Jul-09 1:39
professionalNagy Vilmos20-Jul-09 1:39 
GeneralRe: Can anybody tell me the difference between J2EE, J2SE, J2ME. Pin
Luc Pattyn19-Jul-09 8:56
sitebuilderLuc Pattyn19-Jul-09 8:56 
GeneralRe: Can anybody tell me the difference between J2EE, J2SE, J2ME. Pin
Nagy Vilmos20-Jul-09 1:40
professionalNagy Vilmos20-Jul-09 1:40 
AnswerRe: Can anybody tell me the difference between J2EE, J2SE, J2ME. Pin
Rajdeep.NET19-Jul-09 7:14
Rajdeep.NET19-Jul-09 7:14 
QuestionRegarding zip files in java [modified] Pin
chinnasri16-Jul-09 16:51
chinnasri16-Jul-09 16:51 
AnswerRe: Regarding zip files in java Pin
harold aptroot16-Jul-09 17:03
harold aptroot16-Jul-09 17:03 
GeneralRe: Regarding zip files in java Pin
chinnasri16-Jul-09 17:06
chinnasri16-Jul-09 17:06 
GeneralRe: Regarding zip files in java Pin
harold aptroot16-Jul-09 17:53
harold aptroot16-Jul-09 17:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.