Image of board

hi there..
i dont know if this is possible to do in labview.
I have a test board. with devices on a position on the board.
i want to know if i can draw a broad with labview and whatever positions that have the devices on the board. will be highlighted or indicated somehow that there are devices there...
for instant this image....
i have devices in position 0, 3, 5, 8, 10, 11, 14, 16, 20
I already have an array of all the positions...but the array is 1D.
i want to know if it is possible to set an image like the actual board or something similar and indicated the one that is located on the board..
I dont know if that is possible. can someone let me know.
thanks
http://forums.ni.com/attachments/ni/170/323443/2/draw%20board%202.PNG
Message Edited by krispiekream on 05-13-2008 06:31 PM
Message Edited by krispiekream on 05-13-2008 06:31 PM
Best regards,
Krispiekream
Attachments:
draw board.PNG ‏28 KB
draw board 2.PNG ‏31 KB

Consider a typdef cluster of leds or customized buttons or pict boxes (very nice for graphics and has as many predefined states as needed).  This is not as flexible as the picture bux but very easy to implement and works well in a dataflow model to store yhe system state.   See attached
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Attachments:
Board cluster.vi ‏13 KB

Similar Messages

  • Uses for trigger on image acquisition board.

    I am new to the concept of external triggering of events. I am trying to figure out how to use the trigger on an image acquisition board (specifically - I have the pci-1411). I am wondering if I can use the trigger for things that have nothing to do with image aquisition. I don't necessarily want to acquire an image when the board receives a trigger signal. I would like to use the board to detect that trigger signal, and, when it does, execute a particular set of code. Can this be done?
    Also, I am wondering if the IMAQ image acquisition boards that are capable of generating a signal through this trigger (I understand that the pci-1411 cannot generate a signal?) could be used to control some external device like a s
    mall motor for example.
    Thank you for your help.

    Kindly refer,
    http://zone.ni.com/devzone/conceptd.nsf/webmain/BF9C43586430C32B86256BFB00528558?opendocument
    http://search.ni.com/query.html?col=alldocs&qp=%2Bcontentformat%3Asoftwarelib&layout=SoftLib&qt=%2Bimaq+trigger+pulse
    The pulse that the imaq board generates is not meant to drive motors. For that we have motion cards, refer, ni.com/motion
    http://zone.ni.com/devzone/conceptd.nsf/webmain/66E6F4EE7E0848D686256A550060C436?opendocument
    IMAQ Generate Pulse - This function allows you to generate a pulse from the TIO chips on the board. This functionality is only supported with the 1409 and the digital boards (1422, 1424, 1428). You can only drive at most two pulses at once. Driving pulses doesn't require events, unless you are triggering the pulse off o
    f the Frame Start or Frame Done.
    IMAQ Trigger Read - This function allows you to read the status of External Trigger lines or RTSI lines.

  • Image checker board

    Just installed Appeture and included the Tibet files. I also brought in some raw files.
    When I veiw some of the files, both the tutorial and my raw files (canon 20D) they have a weak to strong green checker board in some areas. I thought these might be out of gamut, but there are also present on the tibet images also. The displays are apple cinema displays, the graphics card is ATI Radeon 9600 XT:
    Has anyone else had a problem like this?

    Just installed Appeture and included the Tibet files.
    I also brought in some raw files.
    When I veiw some of the files, both the tutorial and
    my raw files (canon 20D) they have a weak to strong
    green checker board in some areas. I thought these
    might be out of gamut, but there are also present on
    the tibet images also. The displays are apple cinema
    displays, the graphics card is ATI Radeon 9600 XT:
    Has anyone else had a problem like this?
    Canon users are having a lot of conversion issues, hoping that a RAW update fixes those before long...
    For that specific issue, I cannot tell if it might be something already fixed by an update. Do you have the Aperture 1.0.1 update applied and also 10.4.4 installed? Normally I would assume you had but since you've only just installed...

  • Why my image acquisition pci 1409 board could not be detected by matlab image acquisition toolbox?

    i have a National Instruments PCI-1409 image acquisition board that works very well
    with the software provided by National Instruments, whereas it could
    not be detected by matlab image acquisition toolbox when the command
    "imaqhwinfo" was executed. I don't know why. the system is XP and
    DirectX9.
    any of your advice will be greatly appreciated.
    thanks
    yours sincerely
    Jing
    [email protected]

    Is your matlab image acquisition toolbox DirectX based? If so, NI frame grabber will not work for your matlab image acquisition toolbox because it does not provide WDM or VFW drivers.
    Irene He
    [email protected]
    www.hytekautomation.com

  • How can I program my imager to take longer samples using labVIEW?

    What I would like to be able to do is to use LabVIEW to program my external hardware to take a sample length of a specific time. I would also like to be able to find out how fast my Imager is sampling at, kind of like using the program as an oscilliscope to read the sampling rate of my hardware.
    Any advice would be much appreciated.
    Thanks,
    Brian

    Bruce,
    I have a PCI-1424 Image Aquisition board, and it is connected to a KLI-2113 Kodak imager. The reason that I was thinking that I could get some kind of clock reading from the Kodak imager is that In the graphs, (I will send them), in some of them you can definatly see a pattern, exspecially if you leave the points on the chart and run another cycle, they almost mimick the previous results. What I would like to be able to do is to see how long each one of those cycles are running. The graphs time axises are messed up because If I have it one way I get like 295 and if I transpose it I get 79, (as you can see in the graphs). I think those are how many samples that are comming from the board but in some instances you can see th
    e exponential grades on the graphs and charts which leads me to believe that somehow the CCD chip is reading the collected charge in samples starting from the left to the right, (or the other way). I want to know how it is reading it, how long each sample is and how to collect either x amount of samples or y amount of time for each sample. Also it is interesting to note that the sampling on the x axis stay the same no matter where and how the light is shown onto the CCD chip.
    Anyways, I will attach the graphs so you can see what I mean and I will also attach the KLI-2113 Manual. I really appreciate your help Bruce,
    Brian
    Attachments:
    kliColorEvalBoard.pdf ‏247 KB
    Close_vs_Far.doc ‏349 KB
    Thin_Band.doc ‏136 KB

  • Missing ID file for 1049 image card and JAI-M10bx camera?

    IMAQ examples have code for JAI-M10 camera.
    i got a JAI-M10/bx model.
    ni-1409 image card.
    However my PC/win200 with Labview-7& Imaq don't offer
    an *.ICD file to setup that camera.
    i am trying to setup a dual camera system with two
    1409 cards.
    where/how can i get the ICD file?
    thanks
    larryb

    larryb,
    I noticed in your post that you mention you have an analog image acquisition board (PCI-1409) and that you are looking for an .ICD file for your camera. ICD files are used only for digital cameras, there are equivalent files called .IID files for analog cameras that work in much the same way. There is however one big difference between analog and digital cameras. Digital cameras are usually custom designed, and as a result require a custom configuration file (.ICD file). Analog cameras generally adhere to a standard (NTSC, PAL, RS170, CCIR) and as a result there is no need to create a custom file for each camera, instead, you can just use one of the generic .IID files that come preinstalled with the NI-IMAQ driver.
    I took a look at JAI's website, an
    d it appears that the model of camera that you are using (JAI-M10BX) comes in two formats, CCIR and RS170 (also called EIA). Your documentation should clarify which format you are using. To set your camera to the appropriate format, open Measurement and Automation Explorer (MAX) and click on the channel of your 1409 board that your camera is hooked to. Right-click on this channel and select Camera » CCIR or Camera » rs170 depending on which format your camera uses. This should get your camera working properly.
    Regards,
    Jed R.
    Applications Engineer
    National Instruments

  • Has anyone has developed a driver which uses labview to control an EPIX(R)D PCI Digital Video Capture Board?

    We have an EPIX(R) D PCI Digital Video Capture Board from EPIX Inc. worked with Image Pro Plus and a
    Kodak Megaplus 1.4 CCD Camera. This camera is an old model with Camera Control Unit. Now we use Excel Macro works with all of these software and hardware and the whole system works excellent. Now we intend to update the software to Labview 6.1, IMAQ vision builder and IMAQ vision. But we didn't find the driver to let Labview work with EPIX(R) D PCI Digital Video Capture Board. I have contactd Epix Inc. They said some customers have developed their own driver for labview and it works fine.But this company doesn't support this driver. It will be appreciated if anyone ca
    n provide this driver for us. Thank you very much.

    George. You probably don't have many options with the Epix board. However, if your Epix software enables you to save files to disk, then you can open them from LabVIEW and process them with Vision or Vision Builder.
    Another option is to contact Graftek (www.graftek.com) or ImageMill (www.imagemill-tech.com). They have created drivers for third party image acquisition boards in the past and they may have one for your Epix board.
    A third option, of course, is to upgrade your Epix board to an NI IMAQ board. Your sales contact within NI may even be able to give you a discount on the trade in, but I can't guarantee it.
    Good luck!
    Kyle V

  • Hauppauge ImpactVCB Video Capture Board - Anyone use it?

    Has anyone used Hauppauge ImpactVCB Video Capture Board with Flash Media Live encoder and have success?

    George. You probably don't have many options with the Epix board. However, if your Epix software enables you to save files to disk, then you can open them from LabVIEW and process them with Vision or Vision Builder.
    Another option is to contact Graftek (www.graftek.com) or ImageMill (www.imagemill-tech.com). They have created drivers for third party image acquisition boards in the past and they may have one for your Epix board.
    A third option, of course, is to upgrade your Epix board to an NI IMAQ board. Your sales contact within NI may even be able to give you a discount on the trade in, but I can't guarantee it.
    Good luck!
    Kyle V

  • Blackjack drawing multiple images problem

    Hi. Im making a blackjack game and im having some trouble drawing the images.
    The drawing is fine. But the problem is when to draw new cards. I dont know how to draw a new card without the old one dissapearing. I understand why it dissapears as the code is now, but i dont know how to fix it. Somehow i have to make each card beeing able to paint itself on the board? The filenames of the images to be drawn is fetched by the getCard() in the card class. Since blackjack doesnt use that many cards in play at the same time its possible to simply make more image variables and some if statements deciding which to paint, but that sollution isnt very nice, and i want to make more advanced cardgames after this, so if someone could help me with this it would truly be great.
    Thanks.
    Image displaying board after first new card is dealed, and third one
    http://www.wannerskog.com/newcards.jpg
    Card Class
    public class Card {
         private int value;
         private String color;
         public Card(String incolor,int invalue) {
              value = invalue;
              color = incolor;
         public String getCard() {
              return value+color;
         public int getValue() {
              return value;
    Deck
    import java.util.*;
    //Creates a deck of cards
    public class Deck {
         Card card;
         private Set deck = new HashSet();
         List deck2;
         public void createDeck() {
              for(int i=2; i<=14; i++) {
                   card = new Card("s",i);
                   deck.add(card);
              for(int i=2; i<=14; i++) {
                   card = new Card("h",i);
                   deck.add(card);
              for(int i=2; i<=14; i++) {
                   card = new Card("c",i);
                   deck.add(card);
              for(int i=2; i<=14; i++) {
                   card = new Card("d",i);
                   deck.add(card);
              deck2 = new Vector(deck);
         public void shuffleDeck() {
              Collections.shuffle(deck2);
         public List getDeck() {
              return deck2;
    Dealer Class
    import java.util.*;
    public class Deal {
         Deck deck = new Deck();
         private String card1;
         private String card2;
         public Deal() {
              deck.createDeck();
              deck.shuffleDeck();
         public void dealCards(int j) {
              deck.shuffleDeck();
              List d = (List)deck.getDeck();
              Card card;
              Iterator it = d.iterator();
              String card1 = "";
              String card2 = "";
              for(int i=1; i<=j; i++) {
                   card = (Card)it.next();
                   if(i==1) card1 = card.getCard();
                   if(i==2) card2 = card.getCard();
              this.card1 = card1;
              this.card2 = card2;
         public String getCard1() {
              return card1;
         public String getCard2() {
              return card2;
    Jpanel displaying the buttons
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Controll extends JPanel {
         JButton deal = new JButton("Deal");
         JButton newcard = new JButton("New card");
         JButton stay = new JButton("Stay");
         JButton exit = new JButton("Exit");
         public Controll(View view) {
         final Deal d = new Deal();
         final View v = view;
              class ChoiceListener implements ActionListener
                   int i=0;
                   public void actionPerformed(ActionEvent event) {
                        if("deal".equals(event.getActionCommand()))
                             d.dealCards(2);
                             stay.setEnabled(true);
                             newcard.setEnabled(true);
                             deal.setEnabled(false);
                             v.dealCards(d.getCard1(),d.getCard2());
                             v.resetNew();
                             v.repaint();
                             i=0;
                        if("exit".equals(event.getActionCommand()))
                             System.exit(0);
                        if("newcard".equals(event.getActionCommand()))
                             if(i != 3) {
                                  d.dealCards(1);
                                  v.newCard(d.getCard1(),20);
                                  v.repaint();
                                  i++;
                             if(i == 3) {
                                  newcard.setEnabled(false);
                                  stay.setEnabled(false);
                                  deal.setEnabled(true);
                        if("stay".equals(event.getActionCommand()))
                             deal.setEnabled(true);
                             stay.setEnabled(false);
                             newcard.setEnabled(false);
              Color c = new Color(0, 0, 100);
              setPreferredSize(new Dimension(400, 40));
              setBackground(c);
              ActionListener listener = new ChoiceListener();
              deal.setActionCommand("deal");
              exit.setActionCommand("exit");
              newcard.setActionCommand("newcard");
              stay.setActionCommand("stay");
              exit.addActionListener(listener);
              deal.addActionListener(listener);
              newcard.addActionListener(listener);
              stay.addActionListener(listener);
              add(deal);
              add(newcard);
              add(stay);
              add(exit);
              stay.setEnabled(false);
              newcard.setEnabled(false);
    JPanel displaying the board with cards
    import java.awt.*;
    import javax.swing.*;
    import java.awt.image.*;
    import java.awt.event.*;
    public class View extends JPanel {
         String dealcard1;
         String dealcard2;
         String newcard;
         int i;
         private Image cardimage1 = null;
         private Image cardimage2 = null;
         private Image cardimage3 = null;
         public View() {
              Color c = new Color(0, 100, 0);
              setPreferredSize(new Dimension(400, 300));
              setBackground(c);
         public void dealCards(String incard1, String incard2) {
              dealcard1 = incard1;
              dealcard2 = incard2;
         public void newCard(String incard3,int j){
              newcard = incard3;
              i = i+j;
         public void resetNew() {
              i=0;
              newcard = "";
         public void paint(Graphics g) {
              super.paint(g);
              Toolkit kit = Toolkit.getDefaultToolkit();
              cardimage1 = kit.getImage("CardImages/"+dealcard1+".gif");
              cardimage2 = kit.getImage("CardImages/"+dealcard2+".gif");
              cardimage3 = kit.getImage("CardImages/"+newcard+".gif");
              g.drawImage(cardimage1,80,200,this);
              g.drawImage(cardimage2,100,200,this);
              g.drawImage(cardimage3,180+i,200,this);
    Main
    import javax.swing.*;
    import java.awt.*;
    public class Main
         public static void main(String[] args)
                   JFrame frame = new JFrame("card");
                   View v = new View();
                   Controll c = new Controll(v);
                   frame.getContentPane().add(v, BorderLayout.NORTH);
                   frame.getContentPane().add(c, BorderLayout.SOUTH);
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   frame.pack();
                   frame.show();
    }

    Actually, your app looks okay. Since you asked for some ideas I made some changes, including changing the name of some classes, variables and the image folder. I put all the files in one because I'm lazy. Score is the only class without changes. And nice images.
    Some suggestions:
    1 � try to keep the responsibilities of the View/CardTable class limited to rendering images. You only need to load an image once; continual loading makes for slow performance. If you are using j2se 1.4+ you can use the ImageIo read methods and could then load the images in the Deck class, eliminating the need to pass the images to Deck from View/CardTable (which is an ImageObserver needed for the MediaTracker).
    2 � let the classes do more of the work, eg, Deal/Dealer can add the new cards to the View/CardTable. This will simplify the event code. The ChoiceListener class could be an inner named/nested class and will be easier to follow/maintain if removed from the class constructor.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    public class CardGame
        public static void main(String[] args)
            JFrame frame = new JFrame("card");
            CardTable table = new CardTable();
            Controller control = new Controller(table);
            frame.getContentPane().add(table, BorderLayout.NORTH);
            frame.getContentPane().add(control, BorderLayout.SOUTH);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
    class CardTable extends JPanel {
        Image[] images;
        Image cardBack;
        private String score;
        List player, house;
        public CardTable() {
            loadImages();
            score = "0";
            player = new ArrayList();
            house = new ArrayList();
            Color c = new Color(0, 100, 0);
            setPreferredSize(new Dimension(400, 300));
            setBackground(c);
        public void setScore(int score) {
            this.score = String.valueOf(score);
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            int x = 80, y = 50;
            Card card;
            for(int j = 0; j < house.size(); j++) {
                card = (Card)house.get(j);
                if(j == 0)
                    g.drawImage(cardBack, x, y, this);
                else
                    g.drawImage(card.getImage(), x, y, this);
                x += 20;
            x = 80; y = 200;
            for(int j = 0; j < player.size(); j++)
                card = (Card)player.get(j);
                g.drawImage(card.getImage(), x, y, this);
                x += 20;
            g.setColor(Color.white);
            g.drawString("Score: " + score, 345, 15);
        public void reset() {
            player.clear();
            house.clear();
            repaint();
        public void addCard(Card card)
            player.add(card);
            repaint();
        public void addDealerCard(Card card)
            house.add(card);
            repaint();
        private void loadImages() {
            String[] suits = { "c", "h", "s", "d" };
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            MediaTracker tracker = new MediaTracker(this);
            cardBack = toolkit.getImage("cards/00w.gif");
            tracker.addImage(cardBack, 0);
            images = new Image[suits.length * 13];
            int index = 0;
            for(int j = 0; j < suits.length; j++)
                for(int k = 2; k < 15; k++)
                    String fileName = "cards/" + k + suits[j] + ".gif";
                    images[index] = toolkit.getImage(fileName);
                    tracker.addImage(images[index], 0);
                    index++;
            try
                tracker.waitForAll();
            catch(InterruptedException ie)
                System.out.println("Image loading in CardTable interrupted: " +
                                    ie.getMessage());
    class Controller extends JPanel {
        CardTable table;
        Dealer d;
        JButton deal, newcard, stay, exit;
        public Controller(CardTable ct) {
            table = ct;
            d = new Dealer(table, table.images);
            Color c = new Color(0, 0, 100);
            setPreferredSize(new Dimension(400, 40));
            setBackground(c);
            deal = new JButton("Deal");
            newcard = new JButton("New card");
            stay = new JButton("Stay");
            exit = new JButton("Exit");
            deal.setActionCommand("deal");
            exit.setActionCommand("exit");
            newcard.setActionCommand("newcard");
            stay.setActionCommand("stay");
            ActionListener listener = new ChoiceListener();
            exit.addActionListener(listener);
            deal.addActionListener(listener);
            newcard.addActionListener(listener);
            stay.addActionListener(listener);
            add(deal);
            add(newcard);
            add(stay);
            add(exit);
            stay.setEnabled(false);
            newcard.setEnabled(false);
        private class ChoiceListener implements ActionListener {
            public void actionPerformed(ActionEvent event) {
                String ac = event.getActionCommand();
                if(ac.equals("deal")) {
                    d.prepareDeck();
                    table.reset();
                    d.dealCards(2);
                    d.dealDealerCards(2);
                    stay.setEnabled(true);
                    newcard.setEnabled(true);
                    deal.setEnabled(false);
                    Score s = d.getScore();
                    table.setScore(s.getScore());
                if(ac.equals("exit"))
                    System.exit(0);
                if(ac.equals("newcard"))
                    d.dealCards(1);
                    Score s = d.getScore();
                    table.setScore(s.getScore());
                    if(s.getScore() > 21) {
                        stay.setEnabled(false);
                        newcard.setEnabled(false);
                        deal.setEnabled(true);
                        s.resetScore();
                if(ac.equals("stay"))
                    deal.setEnabled(true);
                    stay.setEnabled(false);
                    newcard.setEnabled(false);
                    Score s = d.getScore();
                    table.setScore(s.getScore());
    class Dealer {
        CardTable table;
        Deck deck;
        Iterator it;
        private int score;
        private int dealerScore;
        Score s;
        public Dealer(CardTable ct, Image[] images) {
            table = ct;
            deck = new Deck(images);
            score = 0;
            dealerScore = 0;
            s = new Score();
        public void dealCards(int j) {
            Card card;
            for(int i = 0; i < j; i++) {
                card = (Card)it.next();
                table.addCard(card);
                if(card.getValue() > 10)
                    score += 10;
                else
                    score += card.getValue();
            s.setScore(score);
            score = 0;
        public void dealDealerCards(int j) {
            Card card;
            for(int i = 0; i < j; i++) {
                card = (Card)it.next();
                table.addDealerCard(card);
                if(card.getValue() > 10)
                    dealerScore += 10;
                else
                    dealerScore += card.getValue();
            s.setDealerScore(dealerScore);
            dealerScore = 0;
        public void prepareDeck() {
            deck.shuffle();
            it = deck.getCards().iterator();
        public Score getScore() {
            return s;
    class Score {
        private int score;
        public void setScore(int s) {
            score = score + s;
        public void resetScore() {
            score = 0;
        public int getScore() {
            return score;
        private int dealerScore;
        public void setDealerScore(int s) {
            dealerScore = dealerScore + s;
            System.out.println("DEALER: " + dealerScore);
        public void resetDealerScore() {
            dealerScore = 0;
        public int getDealerScore() {
            return dealerScore;
    class Deck {
        List cards;
        public Deck(Image[] images) {
            cards = new ArrayList();
            createDeck(images);
        private void createDeck(Image[] images) {
            for(int j = 0; j < images.length; j++)
                int value = j % 13 + 2;
                cards.add(new Card(images[j], value));
        public void shuffle() {
            for(int j = 0; j < 4; j++)
                Collections.shuffle(cards);
        public List getCards() {
            return cards;
    class Card {
        private Image image;
        private int value;
        public Card(Image image, int value) {
            this.image = image;
            this.value = value;
        public Image getImage() {
            return image;
        public int getValue() {
            return value;
    }

  • Application works from NB but not from jar

    Hi,
    I'am programming a game in JAVA and this going as planned. Everything works when I run it from NetBeans, but when I execute the jar file from the console, then I get hunderds of the same exception.
    I really don't know what it is, I see a NoSuchMethod exception in the MouseEvent of the method getLocationOnScreen(), but just as i said, the app works fine without errors from out NB.
    Does somebody knows what the problem is?
    thx Sven
    java -jar Hotel.jar
    Loading board images.
    Loading image: /Images/bg-patern-hotel.jpg
    Opening file /Images/bg-patern-hotel.jpg file exisits: true -- [/Users/svenvanzoelen/NetBeansProjects/Games/Hotel/dist/Images/bg-patern-hotel.jpg]
    Loading image: /Images/Main-board-big.jpg
    Opening file /Images/Main-board-big.jpg file exisits: true -- [/Users/svenvanzoelen/NetBeansProjects/Games/Hotel/dist/Images/Main-board-big.jpg]
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: java.awt.event.MouseEvent.getLocationOnScreen()Ljava/awt/Point;
         at Engine.GameAction.setMousePos(GameAction.java:137)
         at Engine.InputManager.mouseMoved(InputManager.java:277)
         at java.awt.Component.processMouseMotionEvent(Component.java:5647)
         at java.awt.Component.processEvent(Component.java:5371)
         at java.awt.Container.processEvent(Container.java:2010)
         at java.awt.Window.processEvent(Window.java:1184)
         at java.awt.Component.dispatchEventImpl(Component.java:4068)
         at java.awt.Container.dispatchEventImpl(Container.java:2068)
         at java.awt.Window.dispatchEventImpl(Window.java:1801)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Same error goes 50 times more.Edited by: Svenmeister on Apr 16, 2010 7:22 AM
    Edited by: Svenmeister on Apr 16, 2010 7:22 AM

    Ok, I updated my Mac but still got the 1.5.0_22 crap so I changed the function from the mouseEvent to one that 1.5 supports.
    But now when I run the application from the console the Exception about the mouse function is gone, but I got another exception instead of it. And this one is I believe not JRE version relevant.
    The error is in the loading of the images, at the third PNG image to be precise. The images are now in total 10.8MB in size.
    So is this also a 1.6 thing? Would be awesome if someone can explain it.
    java -jar Hotel.jar Loading board images.
    Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:469)
         at apple.awt.OSXImageRepresentation.setPixels(OSXImageRepresentation.java:66)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.PNGImageDecoder.sendPixels(PNGImageDecoder.java:498)
         at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:419)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at java.awt.image.BufferedImage.<init>(BufferedImage.java:345)
         at apple.awt.CGraphicsConfig.createCompatibleImage(CGraphicsConfig.java:174)
         at GUI.Board.toBufferedImage(Board.java:1472)
         at GUI.Board.loadImages(Board.java:1143)
         at Engine.HotelMain.switchState(HotelMain.java:86)
         at Engine.HotelMain.<init>(HotelMain.java:57)
         at Engine.HotelMain.main(HotelMain.java:194)Edited by: Svenmeister on Apr 16, 2010 11:01 AM

  • Question : is it possible to save the contents of the screen in a graphic object ?

    Assume i asked the machine to plot something (for example within the Function application).Is it possible to save the contents of the screen in a graphic variable (GROB ?) for later reference ?

    Hi!, EmileG: From connectivity kit, connected to HP PRIME, you can ... Copy Screen opens the Screen Shot dialog box from where you copy or, save an image of  the virtual calculator screen.You can leave this dialog box open as you prepare instructional materials and reports that require screen captures  from the calculator.The Screen Shot  dialog box has the following options and buttons:• Border: A slider bar to give the image a boarder and change the thickness, of the border.• Size: A slider bar that changes the size, of the image.• Capture:  Update  the image, to reflect the current state of the  virtual calculator display.• Copy: save  a copy  of  the  current  image to  the clipboard.• Save: save  a copy  of  the  image to  a file. In  this case, you  can specify a name and location  for the saved  file.• Close: close the Copy  Screen  dialog box.

  • OT - providing attribution for creative commons photos used in PS?

    I am downloading Creative Commons images to use in CS6 and the licenses for the images ask for attribution. How do you provide attribute on a graphic to the various people who own copyrights? What is your approach with dealing with this? Do you provide attribution somewhere else separately?
    Thanks.

    Here's a few more items that I've put on eBay:
    National Instruments PXI-6025E (200 kS/s, 12-Bit, 16 Analog Input Multifunction DAQ) - Starting Price: $99.00
    National Instruments SCC-68 (68-Pin Terminal Block with SCC Expansion Slots) - Starting Price: $79.00
    National Instruments SCXI-1001 (12-slot SCXI chassis) - Starting Price: $159.00
    National Instruments PXI-1408 (RS-170, CCIR, NTSC, and PAL Image Acquisition Board) - Starting Price: $99.00
    National Instruments PXI-1002 (4 Slot PXI/cPCI Chassis) - Starting Price: $199.00
    National Instruments PXI-6533 (High-speed, 32-bit, parallel digital I/O) - Starting Price: $99.00
    National Instruments PXI-6071E (1.25 MS/s, 12-Bit, 64 Analog Input Multifunction DAQ) - Starting Price: $99.00
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.

  • How can use my ccd camera(roper scientific) in lv6i

    I have one kind of ccd camera made from roper scientific inc(Type_af1041).Now i want to control it lv6i,Can somebody give advice?
    Regard

    You will need hardware (Image Acquisition Boards) and software (IMAQ) from NI vision products and services. Check http://sine.ni.com/apps/we/nioc.vp?cid=1286〈=US for additional infromation.

  • Lacie burner compatibility with Snow Leopard

    I have been corresponding with Lacie concerning the inability with Snow Leopard to use the Lightscribe software anymore. I was able to burn labels before Snow Leopard. Their reply is below and I don't have a clue what they're talking about. I hope someone in this forum can enlighten me.
    Thank you in advance,
    You need to update the silicon image mother board of the Mac to the latest version so the LaCie drive can be operated under Snow Leopard.
    How to do that is actually out of our support field, you will need to contact Mac tech support and they should provide more information on the issue.

    I've never used Lightscribe (my dvd drive is pre-Lightscribe); but I just checked their downloads pages and I saw
    Lightscribe labeler 1.2.2 which "fixes issues with 10.6"
    Have you tried that? I've scoured their support pages and the only reference to a possible problem with 10.6 has to do with a setup assistant for an external hard drive (if you use a setup assistant).
    Their email support could be better (I'm being polite); I have a problem with their statement:
    +"so the LaCie drive can be operated under Snow Leopard."+
    If they are referring to any DVD drive, it is bunk - mine is old and works just fine with 10.6.3 (I just tried it). As for the "silicon image mother board", unfortunately, I don't have a clue - I'd inquire if they're sure they are referring to a Mac rather than a Windows machine because we call it logic board.

  • Please can someone do a Sequence Diagram for this code

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Bgame extends JFrame implements ActionListener
         Map map;
         Location location = new Location();
         Player[] player = new Player[2];
         int playeri = 0;
         Player playerx;
         Image boardi = null;
         Image bcar = null;
         Image gcar = null;
         JButton spinButton = new JButton("Spin");
         JLabel spun = new JLabel("");
         JButton houseButton = new JButton();
         JButton carButton = new JButton();
         JButton playersButton = new JButton();
         JButton bankButton = new JButton();
    public Bgame()
         addWindowListener(new WindowAdapter()
         public void windowClosing(WindowEvent ev)
                   dispose();
                   System.exit(0);
         setBounds(1,1,800,600);
         getContentPane().setLayout(null);
         loadImages();
         map = new Map(boardi);
         map.setLocation(111,0);
         getContentPane().add(map);
         createCpan();
         player[0] = new Player(bcar,Color.black);
         player[1] = new Player(gcar,Color.green);
         map.add(player[0]);
         map.add(player[1]);
         setVisible(true);
         playerx = player[playeri];
         playerx.spin();
         monitor();
    private void monitor()
         Timer timer = new Timer(1000, new ActionListener()
              public void actionPerformed(ActionEvent e)
                   if (playerx.hasToGo)
                        //getToolkit().beep();
                        if (spun.getForeground() == playerx.color)
                             spun.setForeground(Color.gray);
                        else spun.setForeground(playerx.color);
                        return;
                   if (playerx.hasToSpin)
                        if (spinButton.getBackground() == playerx.color)
                             spinButton.setBackground(Color.lightGray);
                        else spinButton.setBackground(playerx.color);
                        return;
              playeri++;
              if (playeri == 2) playeri = 0;
              playerx = player[playeri];
              playerx.spin();
              spun.setText("");
              spinButton.setEnabled(true);
              spinButton.setBackground(playerx.color);
         timer.start();
    private void loadImages()
         boardi = getToolkit().getImage("Game.gif");
         bcar = getToolkit().getImage("blackCar.gif");
         gcar = getToolkit().getImage("blueCar.gif");
         MediaTracker tracker = new MediaTracker(this);
         tracker.addImage(boardi,0);
         tracker.addImage(bcar,0);
         tracker.addImage(gcar,0);
         try {tracker.waitForID(0);}
         catch (InterruptedException e){}
    private void createCpan()
         JPanel pan = new JPanel();
         pan.setLayout(null);
         pan.setBounds(0,0,110,500);
         pan.setBackground(Color.pink);
         spinButton.setBounds(10,34,90,30);
         spinButton.addActionListener(this);
    pan.add(spinButton);
         spun.setBounds(10,64,90,30);
    pan.add(spun);
         getContentPane().add(pan);
    public void actionPerformed(ActionEvent e)
         if(e.getSource() == spinButton)
              int spin = (int)(Math.random()*3+1);
              spun.setText("Total spun = "+spin);
              spun.setForeground(playerx.color);
              spinButton.setBackground(Color.lightGray);
              int togo = playerx.location+spin;
              playerx.go(togo,location.getX(togo),location.getY(togo));
              spinButton.setEnabled(false);
    public static void main (String[] args)
         new Bgame();
    import java.util.*;
    public class Location
         Space[] spaces = new Space[29];
    public Location()
         spaces[0] = new Space(1,238,135,"Start Career");
         spaces[1] = new Space(2,346,135,"Pay Day");
         spaces[2] = new Space(3,417,135,"Rent a Flat Pay 5,000");
         spaces[3] = new Space(4,492,167,"Raffle Prize Collect 10,000");
         spaces[4] = new Space(5,500,218,"PAY DAY");
         spaces[5] = new Space(6,570,269,"STOP Get Married LIFE");
         spaces[6] = new Space(7,570,344,"Wedding Reception Pay 10,000");
         spaces[7] = new Space(8,517,344,"Extra Tuition Pay 5,000 to Teacter");
         spaces[8] = new Space(9,465,344,"Win Quiz Show Collect 95,000");
         spaces[9] = new Space(10,407,344,"PAY DAY");
         spaces[10] = new Space(11,352,344,"Sponsor Golf Pay 35,000 to Athlete");
         spaces[11] = new Space(12,300,344,"Play a family game LIFE");
         spaces[12] = new Space(13,246,344,"Buy Furniture PAY 10,000");
         spaces[13] = new Space(14,183,344,"Visit in laws LIFE");
         spaces[14] = new Space(15,118,344,"STOP Buy a house");
         spaces[15] = new Space(16,68,344,"PAY DAY");
         spaces[16] = new Space(17,10,356,"Swap Salary Cards with any other player");
         spaces[17] = new Space(18,10,412,"Sponsor an athletee Pay 35,000 to Athlete");
         spaces[18] = new Space(19,61,412,"Taxes Due PAY Accountant");
         spaces[19] = new Space(20,115,412,"Baby Girl LIFE");
         spaces[20] = new Space(21,175,412,"Move to a new city PAY 10,000 to Pilot");
         spaces[21] = new Space(22,235,412,"Help the homeless LIFE");
         spaces[22] = new Space(23,304,412,"Win the Lottery Collect 50,000");
         spaces[23] = new Space(24,369,412,"Art auction Pay 20,000 to Artist");
         spaces[24] = new Space(25,434,412,"Invest in a theatre PAY 5,000 To Actor");
         spaces[25] = new Space(26,489,433,"Taxes Due Pay Accountant");
         spaces[26] = new Space(27,518,470,"PAY DAY");
         spaces[27] = new Space(28,519,529,"Night School PAY 10,000 To Teacher");
         spaces[28] = new Space(29,385,529,"RETIRE");
    public int getX(int i)
         return(spaces.x);
    public int getY(int i)
         return(spaces[i].y);
    public String getText(int i)
         return(spaces[i].txt);
    public class Space
         int n,y,x;
         String txt;
    public Space(int n, int x, int y, String txt)
         this.n = n;
         this.y = y-82;
         this.x = x+14;
         this.txt = txt;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Map extends JPanel
         Image board;
         JLabel txt = new JLabel("");
    public Map(Image i)
         board = i;
         setLayout(null);
         setSize(board.getWidth(null),board.getHeight(null));
         addMouseListener(new MouseAdapter()
              public void mouseReleased(MouseEvent m)
                   System.out.println(""+m);
         txt.setBounds(456,04,200,24);
         txt.setBackground(Color.lightGray);
         txt.setOpaque(true);
         add(txt);
    public void setText(String s, Color c)
         txt.setText(s);
         txt.setForeground(c);
    public void paint(Graphics g)
         super.paint(g);
         g.drawImage(board,0,0,null);
         paintComponents(g);
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.image.BufferedImage;
    public class Player extends JLabel
         int location = -1;
         Color color;
         boolean hasToGo = false;
         boolean hasToSpin = false;
         Point sloc;
         int tox,toy;
         int mx,my;
         boolean inPlace = false;
    public Player(Image car, Color c)
         super();
         setIcon(new ImageIcon(trans(car)));
         color = c;
         setBounds(10,10,car.getWidth(null),car.getHeight(null));
         if (getWidth() < 1) setSize(40,40);
         addMouseListener(new MouseAdapter()
         {     public void mousePressed(MouseEvent m)
                   sloc = getLocation();
                   mx = m.getX();
                   my = m.getY();
              public void mouseReleased(MouseEvent m)
                   if (getBounds().contains(tox,toy)) hasToGo = false;
                        else setLocation(sloc);
                   inPlace = false;
                   repaint();
         addMouseMotionListener(new MouseMotionAdapter()
         {     public void mouseDragged(MouseEvent m)
                   if (! hasToGo) return;
                   int x = getX() + m.getX() - mx;
                   int y = getY() + m.getY() - my;
                   if (x < 0) x = 0;
                   if (y < 0) y = 0;
                   setLocation(x,y);
                   if (getBounds().contains(tox,toy)) inPlace = true;
                   else inPlace = false;
                   repaint();
    public void go(int l ,int x, int y)
         hasToGo = true;
         hasToSpin = false;
         tox = x;
         toy = y;
         location = l;
    public void spin()
         hasToSpin = true;
    public void paint(Graphics g)
         super.paint(g);
         g.setColor(color);
         if (inPlace)
              g.setColor(Color.red);
              g.fillRect(8,8,16,16);
         else
              g.setColor(color);
              g.drawRect(0,0,36,38);
              g.drawRect(1,1,34,36);
    public BufferedImage trans(Image img)
         int w = img.getWidth(null);
         int h = img.getHeight(null);
         if (w < 1) w = 40;
         if (h < 1) h = 40;
         BufferedImage to = new BufferedImage(w,h,BufferedImage.TYPE_4BYTE_ABGR);
         to.getGraphics().drawImage(img,0,0,null);
         int r1 = to.getRGB(0,0);
         for (int x=0; x < w; x++)
              for (int y=0; y < h; y++)
                   if (to.getRGB(x,y) == r1) to.setRGB(x,y,0);
         return(to);

    To be fair to Phil, the person wasn't asking how to do a sequence diagram, they just wanted one given to them. I'm sure they would have got a more friendly/informative reply if they had actually asked how to do one.

Maybe you are looking for

  • Make Audit Reports in OIM 9.1.0.1

    Hello Gurus, I need to put in my report the pcq_question from table pcq, but this information was encrypted. How can i make visible this information? I need this in my audit report!!! Thank you very much, Thiago Leôncio

  • Hard drive failure and replacement

    My Macbook's hard drive failed the other day. I am currently in the market for a replacement internal drive. I remember that Apple used to sell the internal drives on their website but cant seem to find them anymore. Did they discontinue them for som

  • Can I make a calendar with Australian dates?

    I'm in Canada and want to make a calendar using iPhoto for my friends in Australia. How can I do this so that the dates correspond to Australian holidays, etc instead of Canadian dates.

  • My iphone is locked by icloud i can´t use the iphone

    my iphone is locked by icloud i can´t use the iphone

  • IMovie showing one thing on the project window and different one in preview

    I have create an iMovie project with iMovie 08. On the project window I could see my pictures as I have imported, in the perfect order and with the correct orientation. I just installed iLife09 and I opened the project on iMovie09. The project window