Code compiles, runs but doesn't display anything, not even Exceptions?

The title just about says it all, but I don't even get a window, why is this? If it's some exception then it's not displaying for me to diagnose. Some pointers in what might be wrong would be really appreciated here - I'm pretty new to Java 3D.
* Test.java
* PrTestf of concept - this class draws a 3D wire-frame model of a BattleZone tank
* @author Mark2
* Created on 10 September 2006, 18:59
package BattleZone;
import java.awt.*;
import java.awt.event.*;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.universe.*;
import com.sun.j3d.utils.geometry.*;
import javax.media.j3d.*;
import javax.vecmath.*;
public class Test extends CloseableFrame
public static View myView = new View();
public static GeometryInfo gi;
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
public Canvas3D canvas3D = new Canvas3D(config);
public SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
public void Test()
    CloseableFrame frame = new CloseableFrame("Proof of Concept");
    setVisible(true);
    MakeUniverse();
    constructView();
public static void main(String args[])
   new Test();
public SimpleUniverse MakeUniverse()
    ViewPlatform myViewPlatform = new ViewPlatform();
    myView.attachViewPlatform(myViewPlatform);
    BranchGroup contentBranchGroup = new BranchGroup();
    simpleU.addBranchGraph(contentBranchGroup);
    simpleU.getViewingPlatform().setNominalViewingTransform();
    MakeSceneGraph();
    return simpleU;
public BranchGroup MakeSceneGraph()
    BranchGroup scene = new BranchGroup();
    populateGraph(simpleU, scene);
    return scene;
private View constructView()
    myView.addCanvas3D(canvas3D);        //NullPointerException
    myView.setPhysicalBody(new PhysicalBody());
    myView.setPhysicalEnvironment(new PhysicalEnvironment());
    return myView;
public static BranchGroup populateGraph(SimpleUniverse simpleU, BranchGroup scene)
    simpleU.addBranchGraph(scene);
    Read_In_Tank_Data();
    return scene;
    public static void Read_In_Tank_Data()
    float[] data = new float[13*3];
    int [] stripCount = {6,7};
    int i = 0;
    //          X               Y                   Z   for each point in the polygon
                                   //Draw near view first
    data[i++]= -1.0f; data[i++]= -1.0f; data[i++]= 0.0f;    //1     Back right corner of base
    data[i++]= -1.5f; data[i++]= -0.5f; data[i++]= 0.0f;
    data[i++]= -1.0f; data[i++]= 0.0f; data[i++]= 0.0f;
    data[i++]= +2.0f; data[i++]= 0.0f; data[i++]= 0.0f;     //Draws base
    data[i++]= +3.0f; data[i++]= -0.5f; data[i++]= 0.0f;     //Forward most point
    data[i++]= +2.5f; data[i++]= -1.0f; data[i++]= 0.0f;     //6
    data[i++]= -1.0f; data[i++]= 0.0f; data[i++]= 0.0f;     //Draw top and turret
    data[i++]= 0.0f; data[i++]= +1.0f; data[i++]= 0.0f;     //Highest point - Antanae array on top of here
    data[i++]= +0.5f; data[i++]= +0.75f; data[i++]= 0.0f;
    data[i++]= -+2.0f; data[i++]= +0.75f; data[i++]= 0.0f;     //10
    data[i++]= +2.0f; data[i++]= +0.5f; data[i++]= 0.0f;
    data[i++]= +1.0f; data[i++]= +0.5f; data[i++]= 0.0f;
    data[i++]= +2.0f; data[i++]= 0.0f; data[i++]= 0.0f;     //13
                                   //Draws far view same as front but with -1 Z values
    data[i++]= -1.0f; data[i++]= -1.0f; data[i++]= -1.0f;         //Back left corner of base
    data[i++]= -1.5f; data[i++]= -0.5f; data[i++]= -1.0f;     //15
    data[i++]= -1.0f; data[i++]= 0.0f; data[i++]= -1.0f;
    data[i++]= +2.0f; data[i++]= 0.0f; data[i++]= -1.0f;     //Draws base
    data[i++]= +3.0f; data[i++]= -0.5f; data[i++]= -1.0f;     //Forward most point
    data[i++]= +2.5f; data[i++]= -1.0f; data[i++]= -1.0f;
    data[i++]= -1.0f; data[i++]= 0.0f; data[i++]= -1.0f;     //20      Draw top and turret
    data[i++]= 0.0f; data[i++]= +1.0f; data[i++]= -1.0f;     //Highest point - Antanae array on top of here
    data[i++]= +0.5f; data[i++]= +0.75f; data[i++]= -1.0f;
    data[i++]= -+2.0f; data[i++]= +0.75f; data[i++]= -1.0f;
    data[i++]= +2.0f; data[i++]= +0.5f; data[i++]= -1.0f;
    data[i++]= +1.0f; data[i++]= +0.5f; data[i++]= -1.0f;     //25
    data[i++]= +2.0f; data[i++]= 0.0f; data[i++]= -1.0f;     //26
    //Need some connecting lines to make a whole object.
    GeometryInfo gi = new GeometryInfo(GeometryInfo.POLYGON_ARRAY);
    gi.setCoordinates(data);
    gi.setStripCounts(stripCount);
    NormalGenerator ng = new NormalGenerator();
    ng.generateNormals(gi);
    gi.recomputeIndices();
    Stripifier st = new Stripifier();
    st.stripify(gi);
    gi.recomputeIndices();
    createWireFrameAppearance();
public static Appearance createWireFrameAppearance()
    Appearance materialAppear = new Appearance();
    PolygonAttributes polyAttrib = new PolygonAttributes();
    polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_LINE);
    materialAppear.setPolygonAttributes(polyAttrib);
    return materialAppear;
}

Its because your public void Test() should be public Test(). Its a constructor, not a method.

Similar Messages

  • Creative cloud installed and run but doesn't display apps or anything for that matters , only a black bar at the top with creative cloud written and a drop down menu of (help pin on notification area and quit ), creative cloud installed and run but doesn'

    creative cloud installed and run but doesn't display apps or anything for that matters , only a black bar at the top with creative cloud written and a drop down menu of (help pin on notification area and quit ), creative cloud installed and run but doesn't display apps or anything for that matters , only a black bar at the top with creative cloud written and a drop down menu of (help pin on notification area and quit )
    don't know if it's relevant or not , I run Windows 8 64-bit

    111994 please try utilizing the steps listed in App doesn’t open | Progress wheel spins continually to resolve the current error.

  • MSI 970a-g46 motherboard starts up but doesn't display anything.

    Hello, I'm having problems with a new motherboard I got from Amazon, specifically the 970a-g46. The following are my specs in use with this motherboard:
    CPU: AMD Phenom 2 x4 965
    GPU: nVidia GeForce 560 GTX
    Ram: 8gb Kingston HyperX Fury 1866mhz.
    PSU: Corsair 650TX (650 Watts)
    Compatability-wise, everything checks out so I wasn't expecting problems at first. All the other parts excluding the ram I've used before. Here's exactly what happens:
    I power up the computer after everything is installed and connected. The 4 phase LEDs turn on which tell me the CPU is powered up and working (so I assume). I don't get any beeps or buzzs mainly because I don't see any speaker/buzzer on this board. The monitor blinks and while it is connected to my GPU, it doesn't display anything, it's just a black screen. I can leave it on for a few minutes and I'll still not see anything happen. An important observation here is that my keyboard which has LEDs will turn on after a short period of time in boot-up (with my older set-up that is). This does not happen ever regardless of how long I leave my computer on on this new mobo.
    I've gone over and checked/tested numerous things:
    * The PCI-E and ATX cables for the GPU, motherboard and CPU are all connected and secured (I've tried both 4-pin and 8-pin connections for the CPU, neither help).
    * I've tried jumping the CMOS multiple times to no avail.
    * I tested the ram on another computer and it worked just fine on that one.
    * I've tested the motherboard without a GPU and it still does nothing (though I think that's because this motherboard doesnt have its own integrated GPU for some reason).
    So far the only possible reasons why my computer is not working is because of my PSU (very unlikely as it's only a year old and it's a Corsair, which I've heard is very reliable in the long-run), GPU (It is quite a few years old but even without the GPU my computer still doesn't go past boot-up), CPU (possible due to its age and how many freaking time I've reseated it (probably around 8 times) so I wouldn't doubt it, but before I put it into this motherboard I did check its pins and they were all there and placed nice and smoothly into the socket.) and finally the motherboard (it's possible that this is just a defected motherboard and giving me a super hard time which would be a first in all the years I"ve spent computer building).
    The best case scenario of course is me giving some kind of oversight to how I transferred over the parts and connectors. I might've missed something obvious to please any advice/insight on how I can solve this problem would be greatly appreciated
    EDIT: Some other things I did but forgot to mention:
    * Checked ground nut things and ensured they matched the specifications of the motherboard ATX; only 6 are under the board and each one is aligned up with the holes on the board as designed.
    * Tried booting up without powering the CPU. Only one phase LED light came on, still the same problem (for an obvious reason this time now).
    * Re-seated GPU multiple times, re-connected cables multiple times.
    What I have NOT done is re-seat the CPU because I am almost out of acetone so I would need to get another supply of that which won't be until tomorrow. I also have not re-seated everything back on my older motherboard to check if it still works. Tomorrow I'll most likely do that and if I find that the old motherboard works flawlessly then that tells me that the new motherboard I got is either defected or there's some compatability issue I"m missed out on.
    EDIT 2: Just found a speaker and plugged it into the motherboard. Booted it up and I got no beeps whatsoever. So this mobo is giving me no video activity (there is a signal it's just blank), and no beeps from the motherboard. I have no idea what that could mean at this point.
    EDIT 3: I decided to test a few things with the new speaker I just got. First I removed ram and tried running, I got 3 beeps which I assume is the beep sequence of faulty/no ram. Removed the power to CPU and the GPU itself individually, gave no beeps this time.

    Quote from: rhradacut on 06-January-15, 16:49:14
    What's the serial number of your MB? Needed to determine what BIOS may be on the MB. Exactly which version of the CPU is it? There were several different 965 CPUs and they required different BIOS versions, 1.2, 1.9,2.2 depending on which CPU you actually have.
     Also another problem may be that native memory supported by your CPU is DDR3-1333, not 1866
     None of the supported CPUs have integrated graphics, any MB graphics would be in the chipset, not CPU. Examples would be 785G, 880G
    Thank you very much rhradacut! The problem was that the mobo for whatever reason was forcing 1866mhz on my CPU when it only supported up to 1600mhz. I had to install a spare ddr3 module to downclock it so that I could access the BIOS and manually set the DRAM timing to 1600mhz for it to work. That's a very strange problem that I figured would've been auto-resolved by the hardware, and would also be a big problem if I didn't have any spare DDR3 ram to work with.
    Once again thanks for helping out on solving my problem.

  • Downloads such as adobe flash update won't download even when anti virus is disabled. The download box appears and runs but doesn't show anything.

    Any updates or downloads won't download in Firefox. The download box appears, goes thru the motions but doesn't park anything in the file. I usually have to quite Mozilla, use Explorer for the download, such as Go to Meeting, or Adobe updates. Can't download anything with Firefox from your browser.

    I am having the same issue -- IE7, XP SP3... Flash Player
    will not download or install, but will download and install for
    Netscape. Must be an IE7 issue, but I can't find a solution. If you
    find something out, it would be freat!
    ([email protected])

  • Safari runs but won't display anything.

    As the title says, all Safari windows seem to have gone somewhere! The app starts but there's nothing visible. Enter full screen and the page appears. Try anything else and nothing at all is displayed. The app seems to be running just fine, right clicking the Dock icon shows a list of open pages, clicking "Show all windows" greys out the Desktop but shows nothing at all. Clicking View and Window options has no effect. I've restarted, but no change. Very odd behaviour, never seen it before. Any solutions?

    I tried switching that Resume feature off, shut all apps, restarted, but Safari is still refusing to display *anything* except in full screen mode.
    (Resume was proving to be pretty irritating on other apps though, like TextEdit and Preview, so I'm glad to know the off switch is there!)
    But this Safari issue is a real puzzle to me. The timing is awful, I need to start accessing my new university course website from today and literally the first time I try this issue appears. Not a complete disaster, I can still open in full screen, but I usually use half a dozen windows at once and being boxed into one is very awkward and not a good start.

  • Preview launch but doesn't display anything

    Well, everything was running (nearly), but since this morning when I want to view an image or a pdf, preview opens but does not show me the pdf or picture.
    Iv' tried opening preview and than do file-open file, but I just got the same result.
    any clues.
    PS: the "nearly" is about an unresolved issue where very frequenly the macbook pro want shut down properly. It looks like it off, but it's not and it won't "wake". The only way I've found to get out of this "nearly off" state is to manually shut it down by pressing the power button for a few sec. Than it boot, but display a message saying that mac os didn't close properly...

    Log back into your problem account:
    Here's the whole litany for thoroughly checking your home folder. It's not as daunting as it looks.
    1. Navigate to ~(YourHome/Library/Fonts - drag this folder to the desktop.
    • Restart and test your applications.
    • If they work start adding the fonts back few at a time.
    ( Likely suspects are Times RO, Helvetica Fractions and Times Phonetic, also if you do not use Classic you can trash the classic fonts.) If not, replace your Fonts folder.
    2. Check Preferences Thoroughly;
    • Navigate to ~(YourHome/Library/Preferences drag this folder to the desktop.
    • Restart and test your applications.
    • If this works, save the old preferences folder somewhere else or on disk, name it "old prefs" .
    ** Note: A very important file is the "com.apple.Mail.plist" preference file located in the Preferences folder which contains all email account settings and general mail preferences (hold this one and replace if your problem is not with Mail).
    You'll have to go through some of your System Preferences and apps to set the preferences back to how you like them. (Or if you have the time and inclination, "cherry pick" through until you find the problem one or two.)
    3. Check Permissions Inside Home Folder
    • Navigate to YourHome/Library.
    • Get Info (Command - i) on folders for apps you are having problems with.
    • Open the "Ownership & permissions" disclosure triangle.
    • Make sure you are the owner, with "read and write" access.
    • Click on "apply to all"
    • If this is correct, open the "Applications Support" folder and do the same procedure (Command+I) for the folders with the names of the applications you are having trouble with.
    (Note:The reason to check this is because repairing permissions with Disk Utility doesn't touch permissions inside your home folder.)
    4. Navigate to YourHome/Library/Caches and drag this folder to the trash, then log out and back or restart. There is no need to replace this folder.
    -mj

  • Disk Utility verify or repair permission runs but doesn't indicate anything

    Recently I ran Disk Utility to repair permissions after a software upgrade and the utility ran and ran, but no permissions were repaired and the utility didn't stop running. After an hour, I stopped running repair permissions. Does this indicate something remiss about the utility? Or worse? What should I do about this?

    You might want to boot from your OS installer disk and launch Disk Utility. Repair Disk from there.

  • Team members see projects, sprints, code, burndown chart, but cannot see backlog items (not even the tasks assigned to them)

    I have a VS Online account (http://tec.visualstudio.com), I created it with my [email protected] ID, now I want to use it for the projects at the university I work for. My work ID is [email protected], and my jobmates use others...
    The University has the MSDN Subscription and we have assigned permissions for it.
    We can see some things in the projects but none of the users (except for the [email protected] ID) can see the baclog items and the boards...

    Hi Christian,
    Thanks for your post.
    Your Free users cannot see the Backlog items and Board pages too? Please share your screenshot(s) here.
    For licenses to users in VSO, please refer to:
    http://www.visualstudio.com/get-started/assign-licenses-to-users-vs.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Satellite M30X-111 screen doesn't display anything but external monitor works

    My laptop screen just doesn't display anything (look like when the computer is off) but when I connect the external monitor, then the desktop will be displayed on that monitor. I tried to recover the laptop using the recovery disk and it worked again, but today, it stopped working again.
    I again have to plug in the external monitor, and after I tried to reboot, I keep pressing F8 but the start up mode doesn't come up, only the sound of when you keep pressing a button for too long beeps, however, the laptop monitor works again.
    How do I fix this problem?

    Hi
    According to your first posting I presume that LCD display on your notebook is defective. If you can not see BIOS settings or Toshiba welcome screen there must be some display problem.
    Experiment with external display is to be sure that graphic card is not responsible for that. In your case it works with external display and graphic card can not be responsible.
    Like I said try to enter bios settings and report if you can see Toshiba welcome screen.

  • My Contacts program opens but doesn't display on the screen (it appears to be off above the top right hand corner).

    My Contacts program appears to open, but doesn't display on the screen (it appears to be sitting just above the top right hand corner). any suggestions on how to get it back?

    Launch Contacts, then on the "Window" menu select "Zoom". That should maximise the window and give you access to the bottom-right corner where you can resize it, and the bar at the top which you can drag around.

  • My iPod syncs, but doesn't save ANYTHING on the iPod

    Basically, my iPod syncs, but doesn't save ANYTHING on the iPod, its the first iPod I have used and it really annoys me... I have tried pretty much everything :@
    Help?!

    Hello JellyPopJade,
    And welcome to Apple Discussions!
    How do you have your iPod configured to sync with your iTunes library? Automatically or do you manually manage its contents by dragging what you would like from your library to the iPod.
    If you have it set to automatically sync all checked songs and videos, make sure each track you wish to sync to your iPod is checked within your iTunes library.
    Under the Summary tab for your iPod, is there any space taken of by the "Other" category (orange)?
    B-rock

  • PR CC doesn't display audio waveforms even though option is checked

    PR CC doesn't display audio waveforms even though option is checked

    I want to thank you for your reply. I figured out what was happening and
    thought you might want to file the information somewhere.
    The problem occurred whenever I imported an older legacy project. Even
    though it was set to display waveform, it wouldn't do it until after I
    closed and reopened the project file.
    Anyway, thanks again!

  • I have tried to connect and purchase on my iTunes Store, but forgot security questions. Not even Customer service is able to help me. How can I spend the 20 bucks I have on my account now if even the phone assistants can't help me?

    I tried to Purchase on the i Tunes store, but forgot security questions. Not even Customer Service is able to help me. How can I spend the 20 bucks I have on my account now if even the phone assistants can't help me? I can't rememeber any answer to any of mu questions and I can't even register my product (iPod Classic) even though I purchased it 6 months ago. Customer Service held me on the line for 30+ minutes asking me all the time if I rememeber one anwer to my questions (to which I repeatedly said no) and there seems to be no way to circumvent that security system, not even with my second email, also registered on My Itunes. Isn't there any way for me to get those 20 dollars back I already have in your store or at least reset my security questions if I don't rememeber?
    Thank you very much.

    qwerqsr, Please contact 1-800-My-Apple, about this issue. The account security team should be able to assist you. Please have your password and the ability to log into your account via appleid.apple.com.
    Thanks,
                A2Q

  • This is going to sound really ridiculous but, what is an "interactive" PDF?  I received a PDF from an organization which stated it was furnishing an "interactive PDF" but on which I am not even able to highlight or make comments.

    This is going to sound really ridiculous but, what is an "interactive" PDF? 
    I received a PDF from an organization which stated it was furnishing an "interactive PDF" but on which I am not even able to highlight or make comments. 

    Well turned out it is secured, but if you can't even highlight points, can you still refer to it as "interactive?" 
    The problem was that they furnished both a book and a PDF file which are identical and I am unable to understand the point. I would refer to the PDF as  "flat" or "static" rather than "interactive."   It seems redundant and I find the description misleading.  It's also remarkably wasteful. 
    (Also, visualize the levels of efficiency between 1) scrolling through a PDF, highlighting certain points, and keyboarding comments vs 2) turning pages in a book, picking up a pen to highlight areas, and getting out the pen and paper to handwrite comments.)  
    Thanks so much for taking the time.

  • My iPhone will connect with my Goodmans bluetooth speaker but my macbook pro will not, even though it will pair with it and 'sees'it

    My iPhone will connect with my Goodmans bluetooth speaker but my macbook pro will not, even though it will pair with it and 'sees' it

    Hi there tomcrud,
    You may find the information in the article below helpful.
    OS X Mavericks: Set up Bluetooth audio devices
    http://support.apple.com/kb/PH14217
    Also, make sure your iPhone is not paired to the speaker while trying to piar it to your Mac.
    -Griff W. 

Maybe you are looking for

  • Segment fault (Core dump)

    Hi when i run the following Pro*c file in Unix Environment im getting the SEGMENTATION FAULT(CORE DUMP) error. I used DBX to debug the code. I couldnt find out the proper reason for this error form the dbx output. This is the output i got from DBX. *

  • I've defragmented the iPod HD and optimized its directory. Anyone else?

    I have these two applications I use for my MBP and external FW drive: 1. iDefrag. For defragmenting HD 2. Disk Warrior 4 (for Intel). Respected directory repair program. Having successfully used these two apps with my normal computing devices, and se

  • Use jQuery Scrollbar (Slider) in AIR App

    I built a simple blog reader that combines Spry's data handling and a one-off jQuery custom scrollbar. In my browser, it works brilliantly, but when I package it up in AIR, it appears that the custom scrollbars which jQuery creates are overwritten/di

  • New Version 1.2 Issue

    Ever since I updated to 1.2 The songs on the nano speed up when waking from sleep mode. This happens everytime it starts. To get it to play normally, I have to foward to the next song and rewind to the song I want to play. I see others have issues re

  • Restriction of DC

    Hi everybody,                      I have created a Dc in NWDI whch is globally accepted by all the developers,But now i want to restrict that DC to some developers.So how can i do that.Please help me regarding this issue.