User Profile

Collapse

Profile Sidebar

Collapse
blackraven1425
blackraven1425
Last Activity: Jun 4 '08, 09:03 PM
Joined: Mar 30 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • blackraven1425
    replied to JMonkeyEngine to create a cube
    in Java
    So, I'm still lost on how to traverse the cube correctly. i*j-k doesnt work right, it only works for the last square in the cube. The rest that shows up is one edge of the cube.
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to JMonkeyEngine to create a cube
    in Java
    the actual source code i have working that gives the triangle
    that canged at different angles

    Node n = new Node();
    for(int i = 1; i<9; i++){
    for(int j=1; j<9; j++){
    for(int k=1; k<9;k++){
    AtomSphere atom = atoms.get((i*j* k)-1);
    atom.setLocalTr anslation(new Vector3f(i, j, k));
    atom.setSolidCo lor(ColorRGBA.g ray);
    n.attachChild(a tom);
    }...
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to JMonkeyEngine to create a cube
    in Java
    oh shoot, i forgot to add that the add object is at i,j,k

    Duh duh = duhs.get((i*j*k )-1);
    duh.setLocalTra nslation(new Vector3f(i, j, k));
    See more | Go to post

    Leave a comment:


  • blackraven1425
    started a topic JMonkeyEngine to create a cube
    in Java

    JMonkeyEngine to create a cube

    I'm using JMonkeyEngine, and trying to make objects in a cube. Meaning, a three-dimensional cube out of objects (Spheres, to be specific). However, the logic is escaping me. This is what I have so far:

    for(int i = 1; i<9; i++){
    for(int j=1; j<9; j++){
    for(int k=1; k<9;k++){
    add object
    }
    }
    }

    I'm really sitting here scratching my head, cause this gives a triangle viewed...
    See more | Go to post

  • blackraven1425
    started a topic Image manipulation problems.
    in Java

    Image manipulation problems.

    I;m trying to scale an image (using the imgae's getScaledInstan ce method) before passing it to an ImageIcon, but it looks like the images are cropped. Has anyone had this problem before? Might it scale one side to the right side then crop the remainder on the other?
    See more | Go to post

  • blackraven1425
    started a topic Eclipse/Image error
    in Java

    Eclipse/Image error

    On Eclipse, I've been getting this error that the method getScaledInstan ce is undefined for type String, but I'm not using Strings, rather 3 ints. Any idea on how to remove this error?

    Image pic2 = pic.getScaledIn stance(640, 480, Image.SCALE_SMO OTH);


    **EDIT** NVM, dumb mistake.
    See more | Go to post

  • blackraven1425
    replied to BAT errors
    in Java
    i've since found out that this is only a problem on the machine I program on. Thanks anyway!
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to BAT errors
    in Java
    Oh, same thing happens when I run as shortcut. When admin doesn't work, regular works but with FNF exceptions for writes only.
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to BAT errors
    in Java
    FileNotFound, btw, is being thrown because of an access denied error. This is why I need to run as admin.
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to BAT errors
    in Java
    Yes, it works when I run it from the command line as administrator. I'm using absolute paths. The directory exists, for now it's in the root of C. Might it be a problem with running the BAT file as an administrator?
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to BAT errors
    in Java
    I forgot to mention, this whole ordeal is on Vista.
    See more | Go to post

    Leave a comment:


  • blackraven1425
    started a topic BAT errors
    in Java

    BAT errors

    I created a JAR file with an application I'm trying to run. However, I'm using a BAT file to run the JAR, and when I do, the JAR is giving FileNotFound exceptions where it should be writing the files. I've tried running the BAT as administrator, but it just doesn't run. Any ideas?
    See more | Go to post

  • blackraven1425
    replied to Sorting dilemma
    in Java
    thanks, i didnt think of that haha. that helps alot!
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to Sorting dilemma
    in Java
    But my problem is, how do I change which value to check against? There's only one argument for compareTo, and I think I'd need another to show which value to check against. How would I do this part of the problem.
    See more | Go to post

    Leave a comment:


  • blackraven1425
    started a topic Sorting dilemma
    in Java

    Sorting dilemma

    I need to sort objects (called items) in an ArrayList by a given field (name, price, etc). What is the easiest way to do this? I'm not sure how to write a comparator, if Collections.sor t is the easiest method. Then that becomes my question: how do I write a comparator that changes which field to compare depending on a value?
    See more | Go to post

  • blackraven1425
    started a topic GUI run problem
    in Java

    GUI run problem

    every time I run this code, the "remove" button only shows up if there's no picture there. is there any fix for this?
    [code=java]
    while(r<list.si ze()){
    JPanel panel2 = new JPanel();
    panel2.add(getS ingle(list, isSmall, r));
    panel2.setName( ""+r);
    panel2.setPrefe rredSize(new Dimension(200,6 00));
    System.out.prin tln(panel2.getN ame());
    panel2.setVisib le(true);...
    See more | Go to post
    Last edited by Nepomuk; Aug 28 '08, 10:26 PM. Reason: Please use [code] tags

  • blackraven1425
    replied to Image problem
    in Java
    Ok, I went and loked up the getImageLoadSta tus constants and had them print out to the command line. One didnt load, the others (2 for now) did, but those two aren't showing up. Is there any other reason why this approach wouldn't be working?
    See more | Go to post

    Leave a comment:


  • blackraven1425
    replied to Image problem
    in Java
    Ok, I tried that, but now I have another problem: the images don't display. Any ideas? What might I be doing wrong here?

    public JPanel getImagePanel(S tring imageFile){
    JPanel panel2 = new JPanel();
    ImageIcon icon = new ImageIcon(image File);
    panel2.add(new JLabel(icon));
    return panel2;
    }
    See more | Go to post

    Leave a comment:


  • blackraven1425
    started a topic Image problem
    in Java

    Image problem

    I'm trying to draw an image to a panel, but am having problems with it not showing up. I know I'm creating/loading the image properly, but I have the feeling I'm not painting it right.

    public class ImageGet extends JPanel{
    public String file = null;
    public ImageGet(String fileName){
    super();
    file = fileName;
    setPreferredSiz e(new Dimension(300, 300));
    }
    public void paintComponent( Graphics...
    See more | Go to post

  • blackraven1425
    replied to JScrollPane Problems
    in Java
    Whoops, forgot the source code to help with this.

    public String main(ArrayListS erial list) {
    x=0;
    g=false;
    JScrollBar scroll = new JScrollBar();
    int r = 0;
    JPanel uber = new JPanel();
    uber.setLayout( new BorderLayout()) ;
    x=0;
    JPanel panel = new JPanel();
    while(r<list.si ze()){
    JPanel panel2 = new JPanel();
    panel2.add(getS ingle(list.get( r)));...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...