My interests

Android: Create Camera App in IntelliJ


Create new Android Module






Name the application
Name the main Activity class




Name the Module and its location
Choose API 17 or higher





  • In Preferences, find Java Compiler
  • Add your project (AndroidCamera)






Set Java Compiler to Java 1.6





Set Module Language Level also to Java 6





Run the MainActivity class




Select emulator








follow the code tutorial :

http://tech.ukidlucas.net/2014/11/android-camera.html




Android: Create Camera App in IntelliJ


Create new Android Module






Name the application
Name the main Activity class




Name the Module and its location
Choose API 17 or higher





  • In Preferences, find Java Compiler
  • Add your project (AndroidCamera)






Set Java Compiler to Java 1.6





Set Module Language Level also to Java 6





Run the MainActivity class




Select emulator








follow the code tutorial :

http://tech.ukidlucas.net/2014/11/android-camera.html




Java: introduction to Java Android programming

Since Android is one of the most prolific uses of Java UI today, we will do a short overview of that platform. We will use the same IntelliJ IDEA we use for or regular java programming.

Android SDK setup:

http://tech.ukidlucas.net/2014/09/android-sdk-set-up-in-ide.html


First of all we have to make sure our IDE has Android plugin:




Download at least one SDK level e.g. API 17:






Create a new Android MODULE:




Name the Module:




Accept default Module SDK, you should have API 17 or up:





Set output path:



Try to run the project:








Android (with ANT) project structure, please not it is different from Maven, or Gradle structure:




We will create an app as such:






With following structure:



















Please follow the rest of the tutorial here:

http://tech.ukidlucas.net/2014/11/android-mediaplayer.html

Java: introduction to Java Android programming

Since Android is one of the most prolific uses of Java UI today, we will do a short overview of that platform. We will use the same IntelliJ IDEA we use for or regular java programming.

Android SDK setup:

http://tech.ukidlucas.net/2014/09/android-sdk-set-up-in-ide.html


First of all we have to make sure our IDE has Android plugin:




Download at least one SDK level e.g. API 17:






Create a new Android MODULE:




Name the Module:




Accept default Module SDK, you should have API 17 or up:





Set output path:



Try to run the project:








Android (with ANT) project structure, please not it is different from Maven, or Gradle structure:




We will create an app as such:






With following structure:



















Please follow the rest of the tutorial here:

http://tech.ukidlucas.net/2014/11/android-mediaplayer.html

Maven: executing JAR created with Maven

In this tutorial we will learn how to create an executable jar with Maven and run it from command line.


Let's add a maven-jar-plugin to your pom, make sure you specify your main class as such:

<mainClass>exec.MyApp</mainClass>





Run Maven:

uki@ JavaFxSceneSwitch $ mvn clean install[INFO] Scanning for projects...[INFO]                                                                         [INFO] ------------------------------------------------------------------------[INFO] Building JavaFxSceneSwitch 1.0-SNAPSHOT[INFO] ------------------------------------------------------------------------...[INFO] Installing .. to /Users/uki/.m2/repository/edu/clcillinois/cit137/JavaFxSceneSwitch/1.0-SNAPSHOT/JavaFxSceneSwitch-1.0-SNAPSHOT.jar[INFO] Installing ...[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 1.822 s[INFO] Finished at: 2015-04-21T14:57:43-05:00[INFO] Final Memory: 15M/91M[INFO] ------------------------------------------------------------------------



Run the app from the ROOT of your project:


uki@ UKI_LUCAS $ java -jar  /Users/uki/.m2/repository/edu/clcillinois/cit137/JavaFxSceneSwitch/1.0-SNAPSHOT/JavaFxSceneSwitch-1.0-SNAPSHOT.jar



The JavaFX app should start, if you start it from other folder, observe how the Image path behaves.

Maven: executing JAR created with Maven

In this tutorial we will learn how to create an executable jar with Maven and run it from command line.


Let's add a maven-jar-plugin to your pom, make sure you specify your main class as such:

<mainClass>exec.MyApp</mainClass>





Run Maven:

uki@ JavaFxSceneSwitch $ mvn clean install[INFO] Scanning for projects...[INFO]                                                                         [INFO] ------------------------------------------------------------------------[INFO] Building JavaFxSceneSwitch 1.0-SNAPSHOT[INFO] ------------------------------------------------------------------------...[INFO] Installing .. to /Users/uki/.m2/repository/edu/clcillinois/cit137/JavaFxSceneSwitch/1.0-SNAPSHOT/JavaFxSceneSwitch-1.0-SNAPSHOT.jar[INFO] Installing ...[INFO] ------------------------------------------------------------------------[INFO] BUILD SUCCESS[INFO] ------------------------------------------------------------------------[INFO] Total time: 1.822 s[INFO] Finished at: 2015-04-21T14:57:43-05:00[INFO] Final Memory: 15M/91M[INFO] ------------------------------------------------------------------------



Run the app from the ROOT of your project:


uki@ UKI_LUCAS $ java -jar  /Users/uki/.m2/repository/edu/clcillinois/cit137/JavaFxSceneSwitch/1.0-SNAPSHOT/JavaFxSceneSwitch-1.0-SNAPSHOT.jar



The JavaFX app should start, if you start it from other folder, observe how the Image path behaves.

JavaFX: switching UI content

In this tutorial we will learn how to switch the UI content of JavaFX Stage using multiple Scenes.
We will crate a simple app that has 3 buttons which change the UI content with the Image shown.





Project Structure



We will start by creating out main Application class which will have member variables which will be references elsewhere:


  • app width
  • app height
  • 3 Scene classes - separate pages we want to show
  • common navigation Pane


The navigation in this project is a simple 3 button VBox Pane, since you will want to improve on it and create a more fancy IMPLEMENTATION of this navigation, let's agree to an interface:



And now the simple implementation of our navigation Pane.




When we are asking for the navigation Pane we pass in some identifier of our own choice:



Next we will create couple of Scene classes, but since they will all adhere to the same pattern let's define a common UI interface:





















Now we can implement 3 of our Scenes, they are very simple thanks to refactoring of the common code.


































Since the pattern of adding Image is the same in all Scenes we created a utility class for that: