JavaFX Talk for RJUG

Thursday, January 15th, 2009 @ %I:%M %p | Technology

This Tuesday I presented on the JavaFX technology to the Rochester Java User Group. It was a lot of fun to do a technical presentation again – it’s been a long time since I spoke on technical stuff. Dave Cok of RIT brought his compiler class to the presentation. That was a little daunting – language theory is not my strongest side – but was very motivating as well.

I used my pet project to talk about how one might migrate a Java project to JavaFX and how to mix Java code and JavaFX code. I have been rewriting Bahamontes in JavaFX and named that project “Anquetil” to stay with the theme (this reminds me that should upload what I’ve been doing with Bahamontes since July ‘07). In order to get the Anquetil work in a state to fit my talk it was a mad scramble during the weekend and Monday. It also became a time scramble because I stared myself blind on two programming mistakes: situations where you know that it is something simple that you have done wrong in the code but you’re just not seeing it. I entertained the audience with them, and here they are for your delight as well.

The first code snippet (why do I get null pointer exceptions during runtime!?):

public class Mapping extends JPanel {
        public void Mapping() {
                myLayout();
                mapClient = new Exec();
        }

        private void myLayout() {
                setLayout(new BorderLayout());
                setPreferredSize(new Dimension(1000, 450));
                JLabel mapLabel = new JLabel();
                mapLabel.addMouseListener(
                        new MouseAdapter() {
                                public void mousePressed(MouseEvent evt){
                                        mapLabelMousePressed(evt);
                                }
                        });
                add(mapLabel, BorderLayout.CENTER);
        }
        private Exec mapClient;
}

And the second (why is the calendar component not showing on the screen in the way I want!?):

public class MyCalendar extends JXMonthView {
        public MyCalendar(final RideData parent) {
                datePicker = new JXMonthView();
                datePicker.setShowLeadingDates(true);
                datePicker.setShowTrailingDates(true);
                datePicker.setTraversable(true);
                addActionListener(
                        new java.awt.event.ActionListener() {
                        public void actionPerformed(ActionEvent evt) {
                                        parent.dateChanged(getSelectedDate());
                                }
                        });
                datePicker.setFlaggedDates(parent.getFlaggedDates());
                datePicker.setSelectedDate(
                        new Date(parent.getFlaggedDates()[0]));
                datePicker.commitSelection();
        }
        private JXMonthView datePicker;
}

Anyways, onto JavaFX. Sun released version 1 of JavaFX on December 4. The technology makes it much easier to create media-rich applications that run on desktops, laptops, in browsers, on cell phones, settop boxes, Bluray players and so forth. With the new plug-in in Java SE 6U10 applets are much more powerful, can interact with JavaScript and with CSS stylesheets, and you can drag them out of the browser.

The part of my own talk that I enjoyed the most was discussing the JavaFX Script language. It has a number of features that enable you to write very efficient code such as “bind”, “on replace” and the operations you can do on sequences. The language has a concept of time (it knows what seconds, milliseconds, minutes and so on are), transformations, interpolations making it very easy to do animations. We examined the source code of some of the samples that come with Netbeans 6.5 and did things like “what happens if you remove ‘bind’ from that statement?”

References:
– The JavaFX website: http://javafx.com
– Get Netbeans 6.5 with the JavaFX SDK: http://netbeans.org
– The new plug-in: http://java.com
– Language tutorial: http://java.sun.com/javafx/1/tutorials/core/
– API reference: http://java.sun.com/javafx/1/docs/api/
– Josh Marinacci’s blog: http://weblogs.java.net/blog/joshy/

 

Recently

  • Montvale NJ
  • Eroica 2015
  • Kids, guns, whatever.
  • Macintosh turns 30
  • I can now confirm the existence of the Area 50 page
  • Bike commuting, The Prequel
  • Tour of California – Time Trial
  • Portola Valley bike ride
  • Finally cut the cable
  • The Weekend Everybody Smiled
  •  

    Comments are closed.

    stretch mark removal products
    Спорт-как способ похудеть ссылка сайт кремлёвской диеты женские сайты диеты как быстро похудеть и накочать мускулы как можно быстро похудеть без проблем рисовая диета для похудения как быстро похудеть, рецепты похудения как похудеть быстро без дееты за 14 дней срочно похудеть с помошью салона красоты в казани как быстро похудеть народные рецепты как похудеть быстро и не мучить себя голодом диеты для снижения веса сайт девчат быстро похудеть на 30 килограмм срочно похудеть на 5 кг. за 10 дней алан кар легкий способ похудеть скачать бесплатно как быстро и безвредно похудеть? как похудеть быстро за месяц 10кг спомощю воды диетхудеем быстро без с упражнениями отзывы средства для похудения хочу быстро легко похудеть быстрый способ похудеть aллен кaрр срочно похудеть за три дня три колограмма быстро похудеть без лекарств худеем быстро после родов ка быстро похудеть делая клизмы сайт диета доктора аткинса легкий способ похудеть от алена карра диета для похудения из куриного мяса танец живота как способ похудеть индивидуальная диета тест худоба ру легкий способ похудеть