Archive | May, 2010

New functions

23 May

I’ve updated Twitthere with some new functionality. The major problem of the previous releases was that they didn’t have a refresh button to refresh the timeline. So, I’v put in a refresh button with which you can check for new tweets. Furthermore, I’ve added an auto refresh feature which automatically refreshes the timeline on a user chosen interval (of 5 – 60 minutes).

The main window now also minimises to the tray and shows a small Twitter icon in the tray. When minimised, it still uses the auto refresh feature and shows a tray balloon when it receives new tweets. To open the Twitthere window again, double click the tray icon or press right mouse button on the tray icon to show a small menu, and click ‘Open’. With ‘Exit’ you can exit Twitthere from the tray.

The updated .jar file can, as you now all know, be downloaded from SourceForge or Softpedia (see ‘Downloads‘).

I hope you like the new additions!

— Léon


New version released (0.2) and SoftPedia Award

17 May

The new award!

Today I’ve decided to release version 0.2 of Twitthere. It features all the basics of Twitter, like for example posting a tweet and mentioning friends. Please remember that it still is a work in progress and therefore it might be a little buggy, but don’t hesitate to try the new 0.2 (it won’t delete any tweets or followers without you knowing 😉 )

Twitthere also received its first award, in the form of a SoftPedia “100% Free” Award, so you can be sure it is free of spyware, adware and viruses. For more information on the award, please visit:

The new version of Twitthere can of course be downloaded from SourceForge:

Also note that if you are upgrading from an older version, it is not necessary to redo the complete OAuth authentication. To keep the current local users in place, just copy the tokens.twtt file from the current directory to the new Twitthere directory, and log in as usual.

I hope you enjoy the new version!

— Léon

Basic Twitter functionality

14 May

Today I finally made Twitthere useful. I added a JTextArea and posting capabilities, so now you can even post a tweet from Twitthere. Funny part is it also shows on that your tweet was posted through Twitthere. Furthermore it is now possible to reply on a tweet from your Home timeline (I’ve programmed it in such a way that the panel can show other timelines too, but for now it just shows the Home timeline), mention a user from your Home timeline or retweet a tweet in your Home timeline. All changes you make in Twitthere will be reflected upon, so it all actually works. 

The new Twitthere client, including replies / mentions & retweets


The only problem I’m having is checking whether you or someone else have retweeted a tweet (so it shows ‘retweeted by you’ and hides the retweet button on startup). If you retweet a tweet in Twitthere itself it updates the labels and buttons cleanly. I posted a screenshot again to give you an idea of how Twitthere evolved during the evening.  

I hope you enjoy reading my blog, checking out the new release and trying to understand the javadoc 😉 

— Léon

Further improvements

12 May

Welcome back to the Twitthere blog! Today I had some time left for Twitthere, so I started improving the proof of concept I posted yesterday. I added a simple colour scheme, aligned the username and the text of the tweet, added the user icon to the panels and put in the date and source of the tweet. In short, that’s just about every basic piece of information a tweet should contain. Try it yourself and see if it works (the current prealpha only shows your Home timeline).

Download the latest version of Twitthere from SourceForge:

I also added the option to remove your own tweets (because it is only possible to remove your own tweets in your Home timeline). To make sure no accidents occur and no one sues me for removing their beautiful tweets, I built in a small confirm dialog to make sure you really want to delete it. It is still kinda buggy though, because if you delete one of your own tweets, for some reason the mouse scroll stops working :S The tweet is also deleted from Twitthere but there is no animation or anything, so the other tweets just shift up immediately (which is kind of ugly).  But fixing the bug and working on the eyecandy have to wait, because it’s time to go to bed.

— Léon

Proof of concept

11 May

Finally! Tonight I had some time left before I went to bed to work on Twitthere. My hands were itching with excitement because the fun part now starts. The whole OAuth cycle is just to support the main application, and that is of course a Twitter application. So, the first things I worked on today was to make sure all tweets and timelines were correctly imported from the API, copying them to a local ArrayList to save on API calls, which are rate limited. I created a wrapper class around the Status class provided by Twitter4j to make my own customizations in the future. So, now the Tweet class exists and every tweet on Twitter is an instance of Tweet in Twitthere.

Twitthere showing my Home timeline

The second thing I wanted to work on was the main window. Because I read an interesting article on advanced GUI creation in Swing, I was sort of experimenting with several JPanels when I actually found something that looked okay. So I implemented all the new methods I created in Tweet and TwitterUser to generate the Home timeline of a user. Although I’m not impressed by the design (far from it) or the way of presenting the tweets, it is a proof of concept which shows that there is light at the end of the tunnel 😉

If you are interested in my small creation, have a look at the screenshot below or download a copy from . Of course you can also download the updated javadoc there.

Please feel free to leave any comments, let me know if it works and especially let me know when it doesn’t.

— Léon

Fight with threads (I won)

4 May

Today I made some major improvements on Twitthere. In short, I completed the OAuth authorisation cycle including serializing the user credentials and token data to a local file. This may seem simple but it is hard to get it right and to keep it that way. I must confess, I haven’t caught all exceptions sufficiently but I was so happy it all worked I’m taking the rest of the evening off 😉 Those exceptions will stay there and wait for me to solve them.

Anyway, it took me a lot of puzzling to get it all right. I’ve been working non-stop from 2 o’clock today until now (half past 10 in the evening) to get it to work. The thing that bugged me most was the loading screen I came up with to keep the user attracted to the program. The API calls to get tokens and swap the request token for an access token take some time, and the GUI would freeze while doing that. Everyone knows that’s a pain in the ass for the user, who has to stare at a frozen GUI for a couple of seconds. So, I threaded the API calls to keep the GUI interactive during the requests and at first it wouldn’t work. Finally, after some thorough puzzling and a lot of trial-and-error, it worked. The loading screen now shows a small animation with ticking dots (like ‘Loading…’, and the amount of dots changes) and it has an animated GIF showing a ‘loading’ animation. You can’t imagine how glad I was I came to the last panel, the ConfirmPanel, which shows that the user can finally start using Twitthere (so weird to put so much effort in the code to just let the user open their profile). For a small development peek, to see how and in what IDE I work, check the images below.

Of course I also updated the javadoc, so have a look at my new panels!

— Léon