• Post Reply Bookmark Topic Watch Topic
  • New Topic

Formatting a Form in Codename One  RSS feed

 
Chris Cordner
Greenhorn
Posts: 5
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'm ultimately trying to design a mobile app in Java, using the Codename One plugin for Netbeans IDE. As a starting point I'm using the HelloWorld template to experiment with it, try things and see what effect it has. That includes the following code:



I understand that it's just adding components and labels and such, in sequence along the screen. What's the best way to go about trying to format them? I want to be able to change colours, mess with fonts, alignments and include pictures etc.

Is there a good tutorial for this kind of thing that you can recommend?

Thanks
Chris
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hadn't heard of this project before today, but my instinct would be to do a web search for codename one tutorial. Did you try that? When I did, it returned some promising-looking links.

This must be a fairly new project -- I'm guessing that because its website provides a lot of video tutorials, which are a fairly new concept in the programming world. So I'm guessing there aren't a lot of experts hanging around forums on the web. Although I could be wrong... anybody out there want to chip in?
 
Chris Cordner
Greenhorn
Posts: 5
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying. I've tried Googling, but they tend to either be tutorials on writing the "Hello, World" application which I've now done in several ways and several formats, or aimed at people with a reasonable amount of Java experience.

Any other help would be appreciated though. I'm making some progress with it, but there's a long way to go!

Thanks again
Chris
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, if you don't have reasonably good Java skills I can see how you might be struggling with all that. Their developer guide looks to me to be pretty comprehensive, but it is 737 pages so you shouldn't expect to get up to speed with all of it right away.

When I'm trying to learn some new part of Java I usually go looking for tutorials, like you have here. Normally I find them, and normally they come with examples which you can download and start tinkering with. I find that very useful. But this product, first of all it doesn't seem to be text-based like Java is, it's more like you have to have this plugin to work with applications. So that sort of explains why there's only video tutorials available, I suppose. I also don't find hardly anything which isn't from the Codename One group, either, which suggests to me that it hasn't generated an ecosystem where outsiders will talk about it independently. So it's still a niche product if you look at it from that perspective.
 
Shai Almog
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out https://www.codenameone.com/manual/theme-basics.html and later on the advanced themeing section where we go into literally taking a design from a Photoshop PSD and converting it to an app. Just published a new article about this the other day at dzone: https://dzone.com/articles/psd-to-app-revisited

The gist of this is just to open the designer and use the UI of the theme to customize anything you want. You can use setUIID() to change the individual UIID of an element to match the styling you define.

FYI the project has been around since early 2012 but it's based on work we started at Sun Microsystems in 2007 and open sourced at JavaOne 2008.

We are currently overhauling the demos completely as well as some of the tutorials. You can check out this somewhat outdated by now course where we go thru two apps and explain how they were made https://www.udemy.com/learn-mobile-programming-by-example-with-codename-one/
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for following up on this post, Shai!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!