Search Results

Search found 6 results on 1 pages for 'pie154'.

Page 1/1 | 1 

  • Build pc with 6 dvi outputs?

    - by pie154
    I am trying to build a pc with 6 dvi outputs, I have already built a machine that does this using a radeon hd 4850x2 graphics card, but unfortunately it seems that this is unvailable to buy from anywhere in the uk currently. has this card maybe been discontinued? As i can't source this card I was wondering if there is another graphics card available that will give 4 dvi ouputs so as I can get the total of 6 needed usin g another normal 2 port card? Thnaks

    Read the article

  • java.lang.ClassNotFoundException using google commons

    - by pie154
    I have two classes inside a package. Both call a method from another class, one works perfectly fine and the other gives the error java.lang.ClassNotFoundException and the error java.lang.NoClassDefFoundError: com/google/common/base/Predicate The class path should be the same for both as they are in he same package so I can't figure out why one has access to the class and the other doesn't? thanks in advance for any help given.

    Read the article

  • Add elements to Arraylist and it replaces all previous elements in Java

    - by pie154
    I am adding elements to a ArrayList and it adds the first one correctly but then when I add any subsequent elements it wipes replaces the other elements with the value form the most recently added and adds a new element to the ArrayList. I ran test using arraylist and ints and even another created class and it worked perfectly but soemthing about the custon class i am using here causes problems. The code for the array list is public static void main(String args[]){ List<BasicEvent> list = new ArrayList<BasicEvent>(); list.add(new BasicEvent("Basic", "Door", 9, 4444, new Date(12,04,2010), new Time(12,04,21), 1, 0.98, 0)); list.add(new BasicEvent("Composite", "Door", 125, 4444, new Date(12,04,2010), new Time(12,04,20), 1, 0.98, 1)); list.add(new BasicEvent("Basic", "Door", 105, 88, new Date(12,04,2010), new Time(12,05,23), 1, 0.98, 0)); list.add(new BasicEvent("Basic", "Door", 125, 12, new Date(12,04,2010), new Time(12,05,28), 1, 0.98, 1)); list.add(new BasicEvent("Basic", "Door", 129, 25, new Date(12,04,2010), new Time(12,05,30), 1, 0.98, 0)); list.add(new BasicEvent("Basic", "Door", 125, 63, new Date(12,04,2010), new Time(12,04,20), 1, 0.98, 1)); list.add(new BasicEvent("Basic", "Detect", 127, 9, new Date(12,04,2010), new Time(12,05,29), 1, 0.98, -1)); for(int i=0;i<list.size();i++) {System.out.println("list a poition " + i + " is " + BasicEvent.basicToString(list.get(i)));} And the code for the custom class basicEvent is public class BasicEvent { public static String Level; public static String EType; public static double xPos; public static double yPos; public static Date date; public static Time time; public static double Rlb; public static double Sig; public static int Reserved; public BasicEvent(String L, String E, double X, double Y, Date D, Time T, double R, double S, int Res){ Level = L; EType = E; xPos = X; yPos = Y; date = D; time = T; Rlb = R; Sig = S; Reserved = Res; }; public static String basicToString(BasicEvent bse){ String out = bse.getLevel() + ";" + bse.getEtype() + ";" + bse.getxPos() + ";" + bse.getyPos() + ";" + bse.getDate().dateAsString() + ";" + bse.getTime().timeAsString() + ";" + bse.getRlb() + ";" + bse.getSig() + ";" + bse.getReserved(); return out; }

    Read the article

  • java gui changing picture causes heapspace error

    - by pie154
    I have a java programme than when a button is clicked it updates the image on screen to the according image. this will work for the first 15 or so clicks then it causes a java heapspace error. I think it is because of the way I am updating the jpanel that contains the bufferedimage but not sure what the reason is. My code to get make the JPanel contain the new image is, public class extraScreenPanel { static JPanel screenPanel = new JPanel(new BorderLayout()); public static JPanel extraScreenPanel(int dispNum) { JLabel label = new JLabel("" + dispNum + ""); label.setPreferredSize(new Dimension(800, 600)); //label.setUI( new VerticalLabelUI(true) ); label.setVerticalAlignment( SwingConstants.TOP ); screenPanel = imgDisp(dispNum); label.setForeground(Color.white); label.setFont(new Font("Serif", Font.BOLD, 200)); screenPanel.add(label, BorderLayout.PAGE_END ); return screenPanel; } public static JPanel imgDisp(int picNum) { /* String url[] = new String[5000]; String part1; url[0] = "C:/PiPhotoPic/pic16.jpg"; for(Integer i=1;i<5000;i++){ if(i<10){part1 = "C:/temp/new0000000";} else if(i<100){part1 = "C:/temp/new000000";} else if(i<1000){part1 = "C:/temp/new00000";} else {part1 = "C:/temp/new00000";} String num = Integer.toString(i); url[i]= part1 + num + ".jpg"; } if(picNum<0){picNum=0;} String ref = url[picNum];*/ //this code is just to get specific ref for image location BufferedImage loadImg = loadImage(ref); JImagePanel panel = new JImagePanel(loadImg, 0, 0); panel.setPreferredSize(new Dimension(800, 600)); return panel; } public static class JImagePanel extends JPanel{ private BufferedImage image; int x, y; public JImagePanel(BufferedImage image, int x, int y) { super(); this.image = image; this.x = x; this.y = y; } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); g.drawImage(image, x, y, null); } } public static BufferedImage loadImage(String ref) { BufferedImage bimg = null; try { bimg = javax.imageio.ImageIO.read(new File(ref)); } catch (Exception e) { e.printStackTrace(); } BufferedImage bimg2 = resize(bimg,800,600); return bimg2; } public static BufferedImage resize(BufferedImage img, int newW, int newH) { int w = img.getWidth(); int h = img.getHeight(); BufferedImage dimg = dimg = new BufferedImage(newW, newH, img.getType()); Graphics2D g = dimg.createGraphics(); g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); g.drawImage(img, 0, 0, newW, newH, 0, 0, w, h, null); g.dispose(); return dimg; } } And the code that updates my gui is, it works by removing the panel from its containg panel and then readding it to it. picPanel = imgDisp.imgDisp(num); repaintPicPanel(); public static void repaintPicPanel() { picPanel.removeAll(); menuPanel.remove(picPanel);; menuPanel.add(picPanel, BorderLayout.LINE_START); }

    Read the article

  • Imageiio can't create imageinput stream

    - by pie154
    When using imageio.imageio.read iget a can't create ImageInput Stream. I have a catch exception around it so the program survives but i was wondering if theres a way to put an if statement round it that checks to see if it falied and then attempt to read it again if it did. basically asking if there is a test for exceptions?

    Read the article

1