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); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)