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

  • SEARCH
  • Home
  • 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 6967605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:20:37+00:00 2026-05-27T16:20:37+00:00

I am trying to have a gradient effect in a horizontalFieldManager through a function.

  • 0

I am trying to have a gradient effect in a horizontalFieldManager through a function. then I am trying to place some controls on top of it.
here is my code

 static public void drawVerticalGradientRoundRect(Graphics g, int x, int y, int w, int h, int arc, int color1,
        int color2) {
    /*--3------4-
    2           5
    |          |
    1          6
    |          |
    |          |
    12         7
    |11--10----9--8
     */
    int xPts[] = {x, x, x + arc, x + w - arc, x + w, x + w, x + w, x + w, x + w - arc, x + arc, x, x};
    int yPts[] = {y + arc, y, y, y, y, y + arc, y + h - arc, y + h, y + h, y + h, y + h, y + h - arc};
    int color[] = {color1, color1, color1, color1, color1, color1, color2, color2, color2, color2, color2, color2};
    byte start = Graphics.CURVEDPATH_QUADRATIC_BEZIER_CONTROL_POINT;
    byte end = Graphics.CURVEDPATH_END_POINT;
    byte endPts[] = {end, start, end, end, start, end, end, start, end, end, start, end};
    g.drawShadedFilledPath(xPts, yPts, endPts, color, null);

but by using this code every thing else on that place is not visible.

  • 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-27T16:20:38+00:00Added an answer on May 27, 2026 at 4:20 pm

    This is because this gradient function will create a round rectangle which comes on top of all the other contro u have place at that place.
    try using

      super.paint(g); 
    

    just after the statement from where you are callng this function
    Hope it will work..

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

Sidebar

Related Questions

Thanks in advance. I'm trying to have a gradient image on the top of
I am trying to have an element fade in, then in 5000 ms fade
I am trying to place a repeating gradient .png as a background-image for a
trying to fix a CSS bug for some code that someone else wrote. I'm
I'm trying to add gradients through css. I have this line for gradients in
I am trying to teach myself Python by working through some problems I came
i am trying to put few images on top of another image, and then
I'm trying to have some padding around the background image which is position to
trying to have some sort of gradiented border by having a parent element have
I have an MVC app. I was trying to get some gradients working for

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.