Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am new with J2ME and I have at least finished my job to develop Mobile Application but now I face a problem with TableLayout actually on Parent screen I have Rendered the list and I use TableLayout for 2 col and 3 row in first col i wish to apply a a TextAreato merge 2 Row and size 70% then in next col I have picture size 30% and in next row I have a Lable and the finaly I wish to apply a Pic pl tell me about something about this
I tag the code below
C#
public ContactsRenderer() {
setLayout(new BorderLayout());
pic.setPreferredSize(new Dimension(50,50));
//pic2.setPreferredSize(new Dimension(26,26));
//pic3.setPreferredSize(new Dimension(28,26));
pic.getStyle().setBgTransparency(0);
pic2.getStyle().setBgTransparency(0);
pic3.getStyle().setBgTransparency(0);
addComponent(BorderLayout.WEST, pic);
TableLayout tblLayout = new TableLayout(3,2);
Container Chcnt = new Container(tblLayout);
Container cnt = new Container(new BoxLayout(BoxLayout.Y_AXIS));
lowerText.getStyle().setBgTransparency(0);
lowerText.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_LARGE));
lowerText.setAlignment(Label.LEFT);
txtDev.getStyle().setBgTransparency(0);
txtDev.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_SMALL));
txtDev.getStyle().setBorder(Border.createEmpty());
 //////this is for the table layout for the constraint on main screen
TableLayout.Constraint tblCnt = tblLayout.createConstraint();
tblCnt.setVerticalSpan(2);
tblCnt.setWidthPercentage(80);
Chcnt.addComponent(tblCnt,txtDev);
//tblCnt = tblLayout.createConstraint();
//tblCnt.setWidthPercentage(20);
Chcnt.addComponent(pic3);
tblCnt = tblLayout.createConstraint();
tblCnt.setWidthPercentage(80);
//tblCnt.setHeightPercentage(20);
Chcnt.addComponent(tblCnt,lowerText);
tblCnt = tblLayout.createConstraint();
tblCnt.setWidthPercentage(20);
tblCnt.setHeightPercentage(60);
Chcnt.addComponent(tblCnt,pic2);
cnt.addComponent(Chcnt);
addComponent(BorderLayout.CENTER, cnt);
focus.getStyle().setBgTransparency(100);
}

thanks n regards

Om Parkash
Posted
Updated 3-Jan-12 20:51pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900