Sunday, April 16, 2006

Two java tricks

I found two useful java tricks today.
  • Calculate the width of a string in pixels
Just use the following code:
Font currentFont = biggestFont;
Font currentFont = new Font(/* define your own font */);
FontMetrics currentMetrics = getFontMetrics(currentFont); // 1
String longString = "This is not a long string!";
Although getFontMetrics from Toolkit is deprecated, JComponent.getFontmetrics is not. More can be found in the java forums.


  • Recurring tasks to update the GUI
The Timer object allows you to schedule TimerTasks at a specified date or at regular intervals. It is very useful when you are polling data which will be later painted on your GUI components.

Saturday, April 15, 2006

Multiple boot on intel macs

I've hardly got time for writing here, but that's one of the advantages of not compromising yourself to writing regularly.

Today I'm going to write about Apple Bootcamp. Apple's move to intel has been really shocking, and bold moves such as the release of the Bootcamp beta create some uncertainty about the future at apple.

Although I myself don't reject the move to intel processors and windows running on a mac with apple's blessing, I am still skeptical. I fear apple might be jumping on the cheap hardware bandwagon and that would definitely be a step backwards. I already don't see whether the new MacBook Pros are superior to their PC counterparts in terms of weight and battery life.

An article at slashdot was what triggered my intention to write this blog entry. It seems that someone has figured out how to boot linux in addition to windows on a mac. Is hell freezing over? I confess I'm intrigued to see what the future holds...

Photo by Joseph Zollo.

Tuesday, November 01, 2005

What this blog is about

With the emotion of starting a blog I realise I forgot to write some kind of introduction. So here it is. I'll be as concise as possible:
  • I consider myself a geek, so expect all sorts of geeky things here.
  • I am writing this blog for myself. I don't care if you want to read what I write. But if you want, you are welcome to do so. What's interesting to me may be also interesting to you.
  • I am going to include here interesting links as well as texts or chunks of code.
  • I am going to use English as the primary language, but I might include texts in other languages as well.
Please feel free to add any comments you like!

OS X 10.4.3 update

Apple released the Mac OS X 10.4.3 update.

Trekkipedia

Trekkipedia, la enciclopedia de Star Trek en castellano.

http://www.misterbo.com.ar/trekkipedia/index.php/Portada