How to make grid view in j2me - java-me

I am very new in j2me. I want to design following type layout and components.
Mean I want to arrange my items in gridview. And after clicking on each item I will move to another form.
I am using simple lcdui. Please suggest me how can I do this. Means how can I arrange these items in gridview and what items should I use here buttons or something else.
You may provide me some suitable links.

In J2ME you have two options for UI: Form and Canvas.
Forms are a very simple way to display information without dealing with the graphical side of things, where Canvas is a blank screen and you need to draw the objects and their behaviors.
There is a third way: the guys at Sun has created a framework called (LWUIT which stands for Light Weight UI Toolkit). This toolkit provides the simplicity of Forms and the UI control of Canvas.
Hope i helped.

Related

Menu Button that does not dismiss options onclick in JavaFX 2

I am quite new in JavaFX and I have a question about the design. I am creating my main menu in FXML using Scene Builder. I have various menu buttons and each of these have a sub-menu. These sub-menu options will open new windows. Is it possible to declare these submenu choices so they do not dissapear after I click on them? If so, can I declare it in my fxml or I have to do it programatically?
Also, is it possible to detach it from the menu button? I would like to have my menu choices around 1 cm away from the menu button itself.
Thank you
Suggested Alternate Solution
If you want more flexibility in positioning a popup menu after a button click as well as fine control over when the menu shows and hides, try using a Button + a ContextMenu rather than a MenuButton.
The relevant methods are:
contextMenu.show(anchorNode, side, dx, dy)
contextMenu.hide()
There is sample code for triggering a context menu on a button press button in the ContextMenu javadoc.
You might also need to monitor the context menu's showingProperty and in a listener show the menu again if the JavaFX system has decided to try and hide it after some user action and you still want the menu visible.
Answers to additional unrelated comments
OK It sounds logical, yet since Im not really good in JavaFX yet, your Idea is quite challenging.
It's not that hard to implement, but from your subsequent comments it sounds like it's probably not the user interface you want for your users anyway (which makes sense to me because the interface you describe in your question seems a little strange).
I thought If it would be easier to have a static xml that have various menu choices, lets say aligned to the right and then whenever I click one of the choices, a new FXML would be loaded in the middle of the screen holding buttons for a submenu?
That seems logical. Sounds like a JavaFX version of a traditional web page layout with a navigation menu on the side controlling a content pane in the center.
A Java only version of that is: How to have menus in java desktop application. You could adapt that to a FXML based version without too much difficulty.
You might also be interested in Managing Multiple Screens in JavaFX.
Also, any tutorial for beginners would be greatly appreciated. These Oracle ones dont make too much sense for me
If you are beginning JavaFX, I recommend using just the Java API portions of JavaFX until you become familiar with them, and then use FXML only after you are comfortable with the Java API.
Personally, I think the Oracle JavaFX Tutorials are excellent. The difficulty for beginners is that the tutorials are also part reference material, which complicates portions of them (especially the deployment related pieces).
If you prefer a different tutorial style see:
Makery JavaFX tutorial (good for beginners)
zenjava tutorials (more advanced)

What is the best way to achieve the following customized layout?

I am kind of wondering what the recommended method is for a customized UI. I have about 5 screens, which will share some of the same elements. One is a topbar, kind of like the navigationbar but different. It has the title on the left, no back buttons, a background image and a logo on the right. The other is a menu at the bottom containing and UIImageView for the bar, 3 UIButtons a the moment opening 2 different screens and one opens the Camera. I want to reuse the top bar and bottom bar on all 5 screens. Sort of like one would use a UserControl on ASP.NET.
Currently I have created 5 ViewControllers, which gives me 5 XIB files that I have to put the same elements on and I have to hook up the same events. I would want to create 2 elements (top and bottom bar) which I can reuse across all screens. Or is there a simpler solution to all of this like e.g. 1 screen pushing different middle parts into it or something like that? Quite the beginner at MonoTouch for that matter, so I'd love to know what the way-to-go for something like this is?
If you are not able to customise / reuse the standard UINavigationController etc, you could -
Create a custom UIView in Xamarin / Monotouch for each of your reusable elements, then insert them into each ViewController (programmatically is probably easiest) as required. This would give some code reuse and is akin to the UserControl example you mentioned.
Alternatively for IOS5+ you could create a Custom ViewController Container which has all the common parts in one place and have a single container UIView which you would then switch the rest of your Content ViewControllers as you need to.
I have actually just finished a github example of this which may help -
https://github.com/wickedw/ViewControllerContainer

How to stretch and scale a single child in a container(e.g. panel, groupbox) to fit different resolution screen? C#.net

Basically, I have an usercontrol as main container, inside which I have a few groupboxes and buttons. But, my interface controls will not be resized and positioned properly as what I expect in design interface.
I've already tried to change the anchor and dock properties but none of them serve my purpose.
I searched online and found something called viewbox in WPF, I'm wondering if there is something like "viewbox" in visual studio 2010?
Please help!
Try using TableLayoutPanel container and put your controls in it. It is similar to the idea of table in HTML where it is divided to rows and columns each one of them can be set to either a set of pixels or a percentage. Usually if you want to use re-sizable form, usually you should have a control that will give you good results when stretching such as image, multiline textbox etc... In addition, put the dock property to fill to get the stretching you want.
I hope this info was useful for you.

GUI Design Terminology

I am looking for the graphic design terminology for describing themed buttons used in a web application. The way I understand it is that certain color/backgrounds are created and various sized and shaped buttons use the background to display.
I have seen them out there - but have no idea exactly how they are used or how to talk about it.
Themeing applies to all controls across a page(s) typically, if you want to isolate a control then you would refer to themed control x. In your case a themed button.
Buttons are usually referred to as having text, image, image and text or bare image. In this scenario the theme could be applied to all these types of buttons excepting the bare image button. Using style (CSS) and or javascript.
Often time raw images are used for buttons in this case the image itself is encapsulateing the theme.
These are usually referred to as image buttons or picture buttons, you could say themed image button.

Representing tables in the LWUIT browser

I am trying to have a horizontally scrolling table within a HTMLComponent as the tables can be wider than the width of the mobile phone and I don't want the user to have a wrapped table. I set setScrollableX(true) for HTMLTable, but I am having a lot of problems getting focus in and out of the different components. Any tips on how I would go about achieving this?
Focus in LWUIT is a mixed bag of issues and the HTML component inherits quite allot of them. The Browser demo available in LWUIT's SVN ( http://java.net/projects/lwuit/sources/svn/show ) has a feature that allows showing a "mouse pointer" within the browser window so you can avoid focus and just point at a cell.
I'm not sure if it was tested with side scrolling but its possibly the easiest approach to make this UI more usable.

Resources