Search Results

Search found 45671 results on 1827 pages for 'facebook java api'.

Page 72/1827 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • How is this tab built? StaticFBML or an Application?

    - by Pasta
    GetSatisfaction built an amazing Facebook tab that goes into the Facebook fan page. Is this built using StaticFBMl or is this a Facebook application? Facebook Applications usually need to be approved before they can be loaded. But this is too much work to be done within StaticFBML I guess. Edit: Here is the link http://www.facebook.com/getsatisfaction?v=app_227698805184

    Read the article

  • Animation Trouble with Java Swing Timer - Also, JFrame Will Not Exit_On_Close

    - by forgotton_semicolon
    So, I am using a Java Swing Timer because putting the animation code in a run() method of a Thread subclass caused an insane amount of flickering that is really a terrible experience for any video game player. Can anyone give me any tips on: Why there is no animation... Why the JFrame will not close when it is coded to Exit_On_Close 2 times My code is here: import java.awt.; import java.awt.event.; import javax.swing.*; import java.net.URL; //////////////////////////////////////////////////////////////// TFQ public class TFQ extends JFrame { DrawingsInSpace dis; //========================================================== constructor public TFQ() { dis = new DrawingsInSpace(); JPanel content = new JPanel(); content.setLayout(new FlowLayout()); this.setContentPane(dis); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setTitle("Plasma_Orbs_Off_Orion"); this.setSize(500,500); this.pack(); //... Create timer which calls action listener every second.. // Use full package qualification for javax.swing.Timer // to avoid potential conflicts with java.util.Timer. javax.swing.Timer t = new javax.swing.Timer(500, new TimePhaseListener()); t.start(); } /////////////////////////////////////////////// inner class Listener thing class TimePhaseListener implements ActionListener, KeyListener { // counter int total; // loop control boolean Its_a_go = true; //position of our matrix int tf = -400; //sprite directions int Sprite_Direction; final int RIGHT = 1; final int LEFT = 2; //for obstacle Rectangle mega_obstacle = new Rectangle(200, 0, 20, HEIGHT); public void actionPerformed(ActionEvent e) { //... Whenever this is called, repaint the screen dis.repaint(); addKeyListener(this); while (Its_a_go) { try { dis.repaint(); if(Sprite_Direction == RIGHT) { dis.matrix.x += 2; } // end if i think if(Sprite_Direction == LEFT) { dis.matrix.x -= 2; } } catch(Exception ex) { System.out.println(ex); } } // end while i think } // end actionPerformed @Override public void keyPressed(KeyEvent arg0) { // TODO Auto-generated method stub } @Override public void keyReleased(KeyEvent arg0) { // TODO Auto-generated method stub } @Override public void keyTyped(KeyEvent event) { // TODO Auto-generated method stub if (event.getKeyChar()=='f'){ Sprite_Direction = RIGHT; System.out.println("matrix should be animating now "); System.out.println("current matrix position = " + dis.matrix.x); } if (event.getKeyChar()=='d') { Sprite_Direction = LEFT; System.out.println("matrix should be going in reverse"); System.out.println("current matrix position = " + dis.matrix.x); } } } //================================================================= main public static void main(String[] args) { JFrame SafetyPins = new TFQ(); SafetyPins.setVisible(true); SafetyPins.setSize(500,500); SafetyPins.setResizable(true); SafetyPins.setLocationRelativeTo(null); SafetyPins.setDefaultCloseOperation(EXIT_ON_CLOSE); } } class DrawingsInSpace extends JPanel { URL url1_plasma_orbs; URL url2_matrix; Image img1_plasma_orbs; Image img2_matrix; // for the plasma_orbs Rectangle bbb = new Rectangle(0,0, 0, 0); // for the matrix Rectangle matrix = new Rectangle(-400, 60, 430, 200); public DrawingsInSpace() { //load URLs try { url1_plasma_orbs = this.getClass().getResource("plasma_orbs.png"); url2_matrix = this.getClass().getResource("matrix.png"); } catch(Exception e) { System.out.println(e); } // attach the URLs to the images img1_plasma_orbs = Toolkit.getDefaultToolkit().getImage(url1_plasma_orbs); img2_matrix = Toolkit.getDefaultToolkit().getImage(url2_matrix); } public void paintComponent(Graphics g) { super.paintComponent(g); // draw the plasma_orbs g.drawImage(img1_plasma_orbs, bbb.x, bbb.y,this); //draw the matrix g.drawImage(img2_matrix, matrix.x, matrix.y, this); } } // end class enter code here

    Read the article

  • outofmemoryerror when running jar but not when running in netbeans/ apache poi

    - by Laughy
    I basically have a program that filters records from one excel file to another excel file using the apache poi. My program runs fine when it runs using netbeans. However, upon doing a clean and build and double clicking the .jar file inside the dist folder, it runs for very long( too long!) and gives me the following error( that I got by running the program from command prompt ). Is there any work around for it? I have already increase the heap size to be -Xms1500m inside netbeans before cleaning and building. Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at org.apache.xmlbeans.impl.store.Saver$TextSaver.resize(Saver.java:1592) at org.apache.xmlbeans.impl.store.Saver$TextSaver.preEmit(Saver.java:1223) at org.apache.xmlbeans.impl.store.Saver$TextSaver.emit(Saver.java:1144) at org.apache.xmlbeans.impl.store.Saver$TextSaver.emitElement(Saver.java:926) at org.apache.xmlbeans.impl.store.Saver.processElement(Saver.java:456) at org.apache.xmlbeans.impl.store.Saver.process(Saver.java:307) at org.apache.xmlbeans.impl.store.Saver$TextSaver.saveToString(Saver.java:1727) at org.apache.xmlbeans.impl.store.Cursor._xmlText(Cursor.java:546) at org.apache.xmlbeans.impl.store.Cursor.xmlText(Cursor.java:2436) at org.apache.xmlbeans.impl.values.XmlObjectBase.xmlText(XmlObjectBase.java:1455) at org.apache.poi.xssf.model.SharedStringsTable.getKey(SharedStringsTable.java:130) at org.apache.poi.xssf.model.SharedStringsTable.addEntry(SharedStringsTable.java:176) at org.apache.poi.xssf.usermodel.XSSFCell.setCellType(XSSFCell.java:755) at equity.EquityFrame_Updated.copyRowsFromOldToNew(EquityFrame_Updated.java:646) at equity.EquityFrame_Updated.init(EquityFrame_Updated.java:133) at equity.EquityFrame_Updated.createAndShowGUI(EquityFrame_Updated.java:71) at equity.EquityFrame_Updated.<init>(EquityFrame_Updated.java:50) at equity.FileOpener.generateButtonPressed(FileOpener.java:160) at equity.FileOpener.access$100(FileOpener.java:17) at equity.FileOpener$2.actionPerformed(FileOpener.java:61) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source)

    Read the article

  • Bitbucket API authentication with Python's HTTPBasicAuthHandler

    - by jbochi
    I'm trying to get the list of issues on a private repository using bitbucket's API. I have confirmed that HTTP Basic authentication works with hurl, but I am unable to authenticate in Python. Adapting the code from this tutorial, I have written the following script. import cookielib import urllib2 class API(): api_url = 'http://api.bitbucket.org/1.0/' def __init__(self, username, password): self._opener = self._create_opener(username, password) def _create_opener(self, username, password): cj = cookielib.LWPCookieJar() cookie_handler = urllib2.HTTPCookieProcessor(cj) password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() password_manager.add_password(None, self.api_url, username, password) auth_handler = urllib2.HTTPBasicAuthHandler(password_manager) opener = urllib2.build_opener(cookie_handler, auth_handler) return opener def get_issues(self, username, repository): query_url = self.api_url + 'repositories/%s/%s/issues/' % (username, repository) try: handler = self._opener.open(query_url) except urllib2.HTTPError, e: print e.headers raise e return handler.read() api = API(username='my_username', password='XXXXXXXX') api.get_issues('my_username', 'my_repository') results in: >>> Server: nginx/0.7.62 Date: Mon, 19 Apr 2010 16:15:06 GMT Content-Type: text/plain Connection: close Vary: Authorization,Cookie Content-Length: 9 Traceback (most recent call last): File "C:/USERS/personal/bitbucket-burndown/bitbucket-api.py", line 29, in <module> print api.get_issues('my_username', 'my_repository') File "C:/USERS/personal/bitbucket-burndown/bitbucket-api.py", line 25, in get_issues raise e HTTPError: HTTP Error 401: UNAUTHORIZED api.get_issues('jespern', 'bitbucket') works like a charm. What's wrong with my code?

    Read the article

  • How to secure Java webservices with login and session handling

    - by hubertg
    I'd like to secure my (Java metro) webservice with a login. Here's how I'm planning to do that: Steps required when calling a webservice method are: call login(user,pwd), receive a session token 1.1 remember the token call servicemethod (token, arg1, arg2...) webservice checks if the token is known, if not throw exception otherwise proceed logout or timeout after x time periods of inactivity my questions: 1. what's your opinion on this approach? does it make sense? 2. are there any libraries which take the burden of writing a session handling (maybe with database persistence to survive app restarts) (the solution should be simple and easily usable with Java and .NET clients) thanks!

    Read the article

  • How to Deploy Simple Java Projects into EAR?

    - by Franco
    Hi, I am using MyEclipse and I use an Enterprise Application Project (EAP) that automattically deploys my Web and EJB Projects. These projects use some other projects that are just POJOs, "simple" java projects. Like a library kind of thing. The problem is that when I change something in on of the "simple" java projects I have to redeploy my entire EAP in my JBoss in order to see the changes. What I want is a way to automatically deploy those projects (POJOs) in the EAP, so hot code replacement works with those too. Any ideas?

    Read the article

  • Using Grapher on GIN application with GinModuleAdapter

    - by Epaga
    I've been trying to use Grapher on my GIN project. But trying to create an Injector to give the InjectorGrapher has not been working. Right in the first line of my code: Injector injector = Guice.createInjector( new GinModuleAdapter( new MyGinModule() ) ); it crashes with Exception in thread "main" java.lang.AssertionError: should never be actually called at com.google.gwt.inject.rebind.adapter.GwtDotCreateProvider.get(GwtDotCreateProvider.java:43) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.BoundProviderFactory.get(BoundProviderFactory.java:56) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:200) at com.google.inject.InjectorBuilder$1.call(InjectorBuilder.java:194) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804) at com.google.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:194) at com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:176) at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:113) at com.google.inject.Guice.createInjector(Guice.java:92) at com.google.inject.Guice.createInjector(Guice.java:69) at com.google.inject.Guice.createInjector(Guice.java:59) at com.me.myself.Grapher.main(Grapher.java:20) What gives?

    Read the article

  • Symfony routing with an API Web Service

    - by fesja
    Hi, I'm finishing the API of our web service. Now I'm thinking on how to make the route changes, so if we decide to make a new version we don't break the first API. right now: url: /api/:action param: { module: api, action: :action } requirements: sf_format: (?:xml|json) what i've thought: url: /api/v1/:module/:action param: { module: api1, action: :action } requirements: sf_format: (?:xml|json) url: /api/v2/:module/:action param: { module: api2, action: :action } requirements: sf_format: (?:xml|json) That's easy, but the perfect solution would be to have the following kind of route # Automatically redirects to one module or another url: /api/v:version/:module/:action param: { module: api:version, action: :action } requirements: sf_format: (?:xml|json) any ideas on how to do it? what do you recommend us to do? thanks!

    Read the article

  • Unable to aquire image through ImageIO.read(url) because of connection timed out.

    - by Jake Frederix
    Following code always fails URL url = new URL("http://userserve-ak.last.fm/serve/126/8636005.jpg"); Image img = ImageIO.read(url); System.out.println(img); I've manually checked the url, and it is valid, and contains a valid jpg image. The problem I get is; Exception in thread "main" javax.imageio.IIOException: Can't get input stream from URL! at javax.imageio.ImageIO.read(ImageIO.java:1385) at maestro.Main2.main(Main2.java:25) Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163) at java.net.Socket.connect(Socket.java:546) at java.net.Socket.connect(Socket.java:495) at sun.net.NetworkClient.doConnect(NetworkClient.java:174) at sun.net.www.http.HttpClient.openServer(HttpClient.java:409) at sun.net.www.http.HttpClient.openServer(HttpClient.java:530) at sun.net.www.http.HttpClient.(HttpClient.java:240) at sun.net.www.http.HttpClient.New(HttpClient.java:321) at sun.net.www.http.HttpClient.New(HttpClient.java:338) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:814) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:755) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:680) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1005) at java.net.URL.openStream(URL.java:1029) at javax.imageio.ImageIO.read(ImageIO.java:1383) ... 1 more Java Result: 1 What does this mean? Funny thing is, if I change my internet-connection to that of the neighbour's wireless, it suddenly does work.

    Read the article

  • Avoid the problem with BigDecimal when migrating to Java 1.4 to Java 1.5+

    - by romaintaz
    Hello, I've recently migrated a Java 1.4 application to a Java 6 environment. Unfortunately, I encountered a problem with the BigDecimal storage in a Oracle database. To summarize, when I try to store a "7.65E+7" BigDecimal value (76,500,000.00) in the database, Oracle stores in reality the value of 7,650,000.00. This defect is due to the rewritting of the BigDecimal class in Java 1.5 (see here). In my code, the BigDecimal was created from a double using this kind of code: BigDecimal myBD = new BigDecimal("" + someDoubleValue); someObject.setAmount(myBD); // Now let Hibernate persists my object in DB... In more than 99% of the cases, everything works fine. Except that in really few case, the bug mentioned above occurs. And that's quite annoying. If I change the previous code to avoid the use of the String constructor of BigDecimal, then I do not encounter the bug in my uses cases: BigDecimal myBD = new BigDecimal(someDoubleValue); someObject.setAmount(myBD); // Now let Hibernate persists my object in DB... However, how can I be sure that this solution is the correct way to handle the use of BigDecimal? So my question is to know how I have to manage my BigDecimal values to avoid this issue: Do not use the new BigDecimal(String) constructor and use directly the new BigDecimal(double)? Force Oracle to use toPlainString() instead of toString() method when dealing with BigDecimal (and in this case how to do that)? Any other solution? Environment information: Java 1.6.0_14 Hibernate 2.1.8 (yes, it is a quite old version) Oracle JDBC 9.0.2.0 and also tested with 10.2.0.3.0 Oracle database 10.2.0.3.0

    Read the article

  • Java Framework Choice Question.

    - by Sarang
    We do have many frameworks available in Java. Struts, Swing, JSF 2.0, Spring etc are used as per their priority. Actually, I don't know how many they are as well! But, as I am fresher to Java, even learning after their architecture, I cannot decide which framework can be used with what type of Projects ! Also, I am confused with mixed use of framework like Spring + JSF. What is the benefit to it ? Another thing making me confusing is about the UI components available in market. Like, we do have Primefaces, Ice-faces, MyFaces, Rich-faces. They may or may not have been supporting AJAX in-built. They may contains some bugs as well. What is best choice for Framework + UI component that can directly provide a best feet solution for any project ?

    Read the article

  • java.security.AccessControlException : access denied (java.util.PropertyPermission http.agent read)

    - by Stefano Borini
    I have a non-signed java applet interacting with the same host. Every time I click on an element in my page, the applet (which is a third part applet I have no control on) should load data from a URL. I say should, because for some files, I get java.security.AccessControlException : access denied (java.util.PropertyPermission http.agent read) and some other files are correctly loaded. All files are correctly readable and downloadable from the web server, and they are very simple text files. I also found that, in some cases, files that previously returned the error are now loaded and continue to load, so it seems a cache is involved somehow. Does any of you have an idea of what's going on here ? The behavior seems to be absolutely random, and I have no way of performing debug on this thing. Note: I used this applet to perform many other "single shot" file access, and it never gave me any problem. The only apparent difference I have is that now I do it "on-demand" via a javascript event. What could be the cause, in the java of the applet or anywhere else ?

    Read the article

  • Which Java web frameworks provide hot-reload?

    - by Stefane Fermigier
    I'd like to know which Java web application frameworks do provide a "hot reload" capability, i.e. allow to develop applications and have them redeployed on the server "almost instantly" (i.e. in less than a few seconds). I the Java world, Play! has it out of the box, but what I'm looking for is a more exhaustive list. Other examples that I'm aware of include: Nuxeo WebEngine, provided you're using Eclipse and the right plugin, or, in the Python world, Django and Pylons (when using the "--reload" option).

    Read the article

  • How Java Runtime Maps to Targets

    - by zharvey
    According to the Javadocs for Runtime here: Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method. An application cannot create its own instance of this class. My question is: what's their definition of an application? Is each JAR/WAR/EAR considered a standalone application? What about a plain ole' Driver.class class with a main() method? What about JEE containers that house EARs and EJBs? I guess I'm trying to understand how many Runtime instances could be up and running inside a complex (JEE) system. And understanding that requires me to understand what specific "things" constitute an "application" in Java terminology. Thanks in advance!

    Read the article

  • ASP.Net Web API Routing fails when api is created as a web application under another asp.net site in IIS

    - by neo
    I developed a rest api using ASP.net web api. When I deploy this rest api on iis, I need to create it as a web application under an asp.net web site. When I was deploying the rest api as a new web site in iis, then things worked fine. I was using the following Route api/{controller}/{id}. When I created the rest api as a web application underneath asp.net web site project, I named the web application as api. I can't access the api methods now. Can someone point what I do wrong?

    Read the article

  • Virtualization of Legacy API and co-existence with more modern API?

    - by Pharaun
    I don't mean for this question to be a flame bait but I'll be using Microsoft and their win32 API as a example of a legacy API. Now what I am wondering here is Microsoft is spending a lots of their money and energy in maintaining their legacy API, including all of the "glitches/bugs/workaround" that are needed to keep the API functioning the same. Now I'm aware that in Windows 7 they are providing a way for the customer to run their application in a "Windows XP" VM which would be one such way for them to start cleaning up their win32 API because they could then push all of the application into the "Windows XP" VM. So now what I am wondering is, is it possible to virtualization a legacy API in such way that an customer/program can still access and use it, yet at the same time be able to take advantage of the newer version/API? Because as far as I understand it, if the application is ran in the "Windows XP" VM, it won't be able to access any of the newer API/feature of Windows 7.

    Read the article

  • Is the offical Sun Java EE tutorial the best way to learn how to make Java web apps?

    - by Nick
    I've been a web developer for almost a decade. I've mostly used classic ASP/JavaScript and I'd like to move into Java based apps. I have a decent understanding of Java itself (enough to know how to lookup what I don't know) and I spent some time doing minor work on a JSF/Spring/Hibernate app, but from what a trusted coworker told me, this application is the example of what not to do. I want to learn the really hardcore stuff (EJBs, HA Clustering, etc), but I know I have to walk before I can run. Is the Sun Tutorial the best place to start? Or is there an definitive book (like K&R for C or Gang of Four for design patterns) that I should buy?

    Read the article

  • Java EE Module Dependencies in web project?

    - by Sled
    Hey guys, I have this webprojec to which I have to add a jar from another EJB project. Normally I'd right-click the webproject and go to properties - Java EE Module Dependencies. I don't know if it is because I upgraded eclipse, or i'm doing something wrong, but I just can't find the "Java EE Module Dependencies" in the properties window. Both projects are linked with the same EAR so the EJB jar file shuld be there! Any ideas what I'm doing wrong or some other way I could attach the EJB's JAR file? I'm only allowed to work with eclipse, so netbeans is not an option. Thanks! EDIT: basically, this is what I want to do, but that specific panel won't show up...

    Read the article

  • How to repair Java in Ubuntu after trying to switch to Java 6 using update-java-alternatives

    - by Kau-Boy
    I tried to switch from Java 5 to Java 6 using the "update-java-alternatives" command like explained on this page: https://help.ubuntu.com/community/Java But afterwards I get the following error when I tried to execute java: root@webserver:~# java Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. I also tried to reinstall the java binaries using "apt-get" but I didn't succeed reinstalling it. I would like to post the "apt-get" errors, but unfortunately I don't know how to print out the error messages in English and not in German. My system is a Ubuntu 8.04 ROOT server. Here is the (Google translated) english text tring to install Java 6 again: root@server:~# apt-get install sun-java6-jdk Reading package lists ... Ready Dependency tree Reading state information ... Ready sun-java6-jdk is already the newest version. sun-java6-jdk set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 86 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. Set up a sun-java6-bin (6-03-0ubuntu2) ... Could not create the Java virtual machine. dpkg: error processing sun-java6-bin (- configure): Subprocess post-installation script returned error exit status 1 Errors were encountered while processing: sun-java6-bin E: Sub-process / usr / bin / dpkg returned an error code (1) I hope that this might help you helping me.

    Read the article

  • Java2D: if statement doesn`t work with java.awt.Color

    - by DarkSun
    I have a getPixelColour function: Color getPixelColor(int x, int y) { if(mazeImage == null) System.out.println(":("); int pixel = mazeImage.getRGB(x, y); int red = (pixel & 0x00ff0000) >> 16; int green = (pixel & 0x0000ff00) >> 8; int blue = pixel & 0x000000ff; return new Color(red,green,blue); } For example a pixel is black, and System.out.println(getPixelColor(x,y) + " " + Color.BLACK); writes "java.awt.Color[r=0,g=0,b=0] java.awt.Color[r=0,g=0,b=0]" But getPixelColor(x,y) == Color.BLACK return false. What's wrong with it?

    Read the article

  • Java - Post to Twitter

    - by Ibolit
    Hi. I've written a simple web application, which i want to post tweets. I have seen some java libraries for working with twitter, and they all seem like too much of work for something that seemingly simple. But it is possible that i am missing something. And I am yet to make any of them work... Is there any simple way to post a tweet in twitter from a web-app in java with only a few lines of code? Thank you very much.

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >