Xaviorin's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Members
Active Posts:
21 (0.04 per day)
Joined:
17-January 13
Profile Views:
1,159
Last Active:
User is offline Jun 29 2013 11:58 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

No latest visitors to show

Icon   Xaviorin //drunk, fix later

Posts I've Made

  1. In Topic: Problem resizable image window on application run joptionpane

    Posted 20 Apr 2013

    View Postg00se, on 20 April 2013 - 09:44 AM, said:

    If you want zooming, look into AffineTransformation, but i'd consider JScrollPane + JLabel + ImageIcon


    g00se as always you're awesome. Thank you sir!

    public static class ScrollPaneFrame {
      public static void Image() {
        JFrame frame = new JFrame();
        JLabel image = new JLabel(new ImageIcon("resources\\SkyrimMap.jpg"));
        frame.getContentPane().add(new JScrollPane(image));
    
        frame.setSize(300, 300);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
      }
    }
    
    


    Then i call the class
    ScrollPaneFrame.Image();
    


    And it worked perfectly! Anyone with issues relating to this type of problem this resource is very helpful

    Add JLabel to JScrollPane
  2. In Topic: Custom named text files to array and output

    Posted 17 Apr 2013

    View Postg00se, on 16 April 2013 - 12:53 PM, said:

    OK. Set up the files. Then just read lines where line.startsWith("Z")


    Ok awesome thank you for sticking it through with my horrible explanation skills lol
  3. In Topic: Custom named text files to array and output

    Posted 16 Apr 2013

    View Postg00se, on 16 April 2013 - 11:13 AM, said:

    Quote

    1 file for each gender/race combo. So a file named maleAltmer and a file femaleAltmer then a file named maleBreton and one femaleBreton. Inside each individual file are names a-z ...


    So that's 10 files containing 26 names


    20 files (10 races , 2 files for each race one being male one being female = 20 files total)

    Each file containing 260 names(10 names for each letter of alphabet, 26 letter in the alphabet)

    For Example:

    maleAltmer.txt

    Aaron
    Asap
    Alan
    Aj
    Ace
    Andy
    Anthony
    Ajax
    Adam
    Acorn
    .
    .
    .
    Zebra
    Zenith
    Zephyr
    Zen
    Zu
    Zabra
    Zumo
    Zatar
    Zulu
    Zoltan

    And what i wish to do from this is if they choose male, Altmer, and the letter z for example. It will read from the file that matches the first 2 criteria of male and altmer being maleAltmer.txt and will grab the 10 entries that start with the letter z and put them into an array then display them in order on screen.
  4. In Topic: Custom named text files to array and output

    Posted 16 Apr 2013

    View Postg00se, on 16 April 2013 - 10:01 AM, said:

    I'm still not much the wiser but anything you could have put in a pre-existing file you could presumably generate on the fly, so why not do that?


    Let me try to clarify. I wanted to read in from a file because i need files that contain different names depending on the gender and race chosen by the user. The other more code intensive and messy option would be to create the arrays inside of if statements but that would consist of copious lines of code that could be cut out by simple reading from txt file containing names. I don't want to write anything to a file, I want to grab information out of the file to display on screen. Am I confused here?

    Instead of making 1300 files we now do this:

    1 file for each gender/race combo. So a file named maleAltmer and a file femaleAltmer then a file named maleBreton and one femaleBreton. Inside each individual file are names a-z ... so 10 names starting with a 10 with b, so on and so forth to z each file containing 260 names each on individual lines. So total that would be maybe 15 files total now? Instead of one file for every letter.

    To do so if someones chooses male, altmer, Q i read from the file maleAltmer.txt and pull out only the names that start with q.

    is that any better? Sorry for the confusion
  5. In Topic: Custom named text files to array and output

    Posted 16 Apr 2013

    View Postg00se, on 16 April 2013 - 10:01 AM, said:

    I'm still not much the wiser but anything you could have put in a pre-existing file you could presumably generate on the fly, so why not do that?



    I don't know why I would need to create a file, I'm trying to read information FROM a file to display through the program. I'm confused now.

My Information

Member Title:
New D.I.C Head
Age:
25 years old
Birthday:
August 4, 1989
Gender:

Contact Information

E-mail:
Private

Friends

Xaviorin hasn't added any friends yet.

Comments

Xaviorin has no profile comments yet. Why not say hello?