Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7598991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:32:55+00:00 2026-05-30T22:32:55+00:00

How to create three editfields like this HorizontalFieldManager hfm_city=new HorizontalFieldManager(); VerticalFieldManager vfm_city = new

  • 0

How to create three editfields like this enter image description here

 HorizontalFieldManager hfm_city=new HorizontalFieldManager();
 VerticalFieldManager vfm_city = new VerticalFieldManager();
 vfm_city.setBorder(
                  BorderFactory.createBitmapBorder(
                  new XYEdges(12,12,12,12), borderBitmap
                          )
                  ); 
            vfm_city.setMargin(0, 200, 0, 0);
            final EditField city = new EditField("", "", 30, BasicEditField.FILTER_DEFAULT){
                                            String emptyString = "City";
                                            protected void paintBackground(Graphics g) {
                                                g.setBackgroundColor(0xFFFFFF);
                                                g.clear();
                                            }
                                            protected void paint(Graphics g) {
                                                int oldColor = g.getColor();
                                                try {
                                                    g.setColor(0x000000);
                                                    test = super.getText();
                                                    if ( test == null || test.length() < 1 ) {
                                                        //g.setColor(Config.hint_colour);
                                                        g.drawText(emptyString, 0, 0);
                                                    }
                                                    super.paint(g);
                                                } finally {
                                                    g.setColor(oldColor);
                                                }
                                            }
                                          };
                                          vfm_city.add(city);




                                      VerticalFieldManager vfm_state = new VerticalFieldManager();
                                      vfm_state.setBorder(
                                              BorderFactory.createBitmapBorder(
                                                  new XYEdges(12,12,12,12), borderBitmap
                                              )
                                          ); 
                                      vfm_state.setMargin(0, 0, 0, 0);
                                          final EditField state = new EditField("", "", 30, BasicEditField.FILTER_DEFAULT){
                                            String emptyString = "State";
                                            protected void paintBackground(Graphics g) {
                                                g.setBackgroundColor(0xFFFFFF);
                                                g.clear();
                                            }
                                            protected void paint(Graphics g) {
                                                int oldColor = g.getColor();
                                                try {
                                                    g.setColor(0x000000);
                                                    test = super.getText();
                                                    if ( test == null || test.length() < 1 ) {
                                                        //g.setColor(Config.hint_colour);
                                                        g.drawText(emptyString, 0, 0);
                                                    }
                                                    super.paint(g);
                                                } finally {
                                                    g.setColor(oldColor);
                                                }
                                            }
                                          };
                                          vfm_state.add(state);


                                          VerticalFieldManager vfm_zip = new VerticalFieldManager();
                                          vfm_zip.setBorder(
                                                  BorderFactory.createBitmapBorder(
                                                      new XYEdges(12,12,12,12), borderBitmap
                                                  )
                                              ); 
                                          vfm_zip.setMargin(0, 0, 0, 0);
                                              final EditField zip = new EditField("", "", 30, BasicEditField.FILTER_DEFAULT){
                                                String emptyString = "Zip";
                                                protected void paintBackground(Graphics g) {
                                                    g.setBackgroundColor(0xFFFFFF);
                                                    g.clear();
                                                }
                                                protected void paint(Graphics g) {
                                                    int oldColor = g.getColor();
                                                    try {
                                                        g.setColor(0x000000);
                                                        test = super.getText();
                                                        if ( test == null || test.length() < 1 ) {
                                                            //g.setColor(Config.hint_colour);
                                                            g.drawText(emptyString, 0, 0);
                                                        }
                                                        super.paint(g);
                                                    } finally {
                                                        g.setColor(oldColor);
                                                    }
                                                }
                                              };
                                              vfm_zip.add(zip);



                                      hfm_city.add(vfm_city);
                                      hfm_city.add(vfm_state);
                                      hfm_city.add(vfm_zip);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:32:57+00:00Added an answer on May 30, 2026 at 10:32 pm

    You are going in the right way. but you have to give specific width & height to yourVerticalFieldManager otherwise it will take full width by default.

    VerticalFieldManager vfm_city = new VerticalFieldManager() {
        protected void sublayout(int maxWidth, int maxHeight) {
            super.sublayout(Display.getwidth()/3,30);
            setExtent(Display.getwidth()/3,30);
        }
    };
    

    Do this in your State & city vfm and add in your hfm and try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create three Pull Down Menus..... This is how they would
In this example I create three buttons 'one' 'two' 'three'. When clicked I want
i have write this block of code in jquery to create three element after
I'm trying to create three separate graphs, this code will give you the idea:
I would like to create three Haskell functions: a , b , and c
This is just an exercise in mechanics. I am attempting to create three custom
I am trying to create three controls that are layed out horizontally. In an
I've written the following code to create a three-column layout where the first and
I want to create two and three dimensional vectors using a constructor in a
I have three problems: I want to create resizable shapes with box bounding... I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.