Disappearing of button

Hello friends,
I am trying to design a program that consists of a jFrame that contains the fallowing components.
1. A jPanel, that i will be using for plotting online voltage graph.
2. Two jButton for starting and stopping the graph.
Now the problem is whenever i make use of 'public void paint(Graphics g) {}' method declaration in my class that extends jFrame class, On executing the two buttons disappear at the start and appears when i move the mouse pointer on its location. Please tell me suitable solution for this problem.
thanks and regards,
Prasad

To do custom rendering, it is generally regarded as a bad idea to subclass JFrame
and override paint. Instead subclass JPanel and
override it's paintComponent method like this:
public class VoltageGraphView extends JPanel {
    protected void paintComponent(Graphics g) {
        super.paintComponent(g); //prepares background
        //do you drawing here.
    }Now that you have a component that does the drawing, your layout will
place it together with your buttons on your JFrame's content pane. Done!

Similar Messages

  • Text disappears on buttons in InDesign cs6

    I'm doing an interactive pdf from InDesign CS6. I have buttons that I've created using just a solid rectangle and reversed white text in the rectangle and the buttons are on my master page. I want my buttons to change to a different colour when you click or mouse over them (only text to change to a different colour). When I go to 'click state' or 'rollover state' (I've tried both), the button is copied and I can change the colour but then in my normal state, I have an overset text, (I get a red plus sign) my text disappears. When I try and correct my normal state, the same thing happens in my click or rollover state. When I export a file to an interactive pdf, my normal state button is without text and my over or click state button has text with the colour that I've selected. Does anyone know why this happens or how to fix it?
    Thanks,
    NZ

    We might be able to help you but you'll have to drop the attitude. We're not Adobe here, but users like you.
    You'll need to tell us exactly what you're doing and what's not working for you. By "rollovers," you could mean the change of appearance of a button. You could also be meaning what are sometimes called Show/Hide buttons where clicking a button causes another button to appear. Which is it?
    And what kind of output are you attempting? Interactive PDF? SWF (Flash)? DPS?

  • Create disappearing radio buttons?

    I'm looking to create a pdf that can act as several templates in one. Is there a way to create radio buttons with text choices and then have the button disappear once the text is selected and just have normal text?

    Hi billm013,
    You would have to test this via javascripting in Acrobat.
    Regards,
    Rave

  • Disappearing Delete button

    There is a bug that existed in 1.1.4 that is still there in 2.0. It is intermittent, but it happens frequently enough that I was able to capture it on video. The bug is simply this: When you swipe an email message to make the Delete button appear, in just a couple of seconds it disappears on its own. This is particularly frustrating if you get some spam and you intend to delete it. By the time you reach up to hit the Delete button, it is gone and you end up opening and reading the message. If the message contains an invisible gif ("web beacon"), then the spammer has you tagged.
    I placed the video at http://www.mckune.net/DeleteBug.mov.

    have you tried the following ?
    open system preferences
    open network pane
    select airport in the left list
    click the advanced button
    go to the TCP/IP tab
    set the configure IPv6 field to OFF.
    click OK
    click apply
    if that doesn't help, you may be suffering from wireless interference.
    download iStumbler and note the channels other networks in the vicinity are broadcasting on, then change the channel your network is using as far away as possible from those.

  • Disappearing Navigation buttons

    Hi,
    I added some custom arrow buttons to my skin to replace the current previous and next buttons in the arrow bar. For some reason, they will not display. They're the same size as all of my other buttons, and they all show up without incident.
    When I generate, I selected "Manually" in the "Syncronize Table of Contents"  section of the properties, hoping that would help, but no luck. Those arrows just won't show up. Any ideas?
    I'm using RH8.
    Thanks!

    Hi there
    Seems this is the week for the nav buttons!
    Check the post linked below and see if it helps.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Disappearing nav buttons in Safari iOS8 - are you kidding?

    How much screen space does this really save? A few millimeters by my measurement! Not worth having to do an extra tap just to get the buttons to reappear (I'm referring to the forward/back buttons on top in Safari). This is so unnecessary and stupid.

    this is what i'm getting:
    Tried refreshing and cleared out browsing cache. Not a huge deal I can just use another browser but still it's weird.

  • To disappear / disable buttons on title bar of JDialog

    hi,
    i want a non-modal JDialog without any buttons on tilte bar.
    i.e i dont want to have the X close button on tilte bar. how can i achieve this
    thanx

    by setting undecorated true whole of the tilte bar goes off. but i just want
    to remove the close button on title bar. any how i found the soln by setting
    setDefaultLookAndFeelDecorated(true) which removes the close button
    from title bar.
    if there is any other method plz suggest

  • HT4085 How do I lock my ipad screen so the swipe action and side button on screen don't work? My cats do these things and the game disappears.

    How do I lock my ipad screen so the swipe action and the side button on the screen do not work?  When my cats play a game on my ipad, they regularly swipe the screen and push the side button and the game disappears.

    The button on the top that you use to lock and unlock or put to sleep is the power button.  The button lower center of the screen is the home button...can be used to also wake from sleep and switch to the base home screen.
    Good to hear you are now able to lock rotation, even if you are not sure how you did it
    If you go to the iBook icon, tap Store in the uppper left side of the screen, you can search for the iPad User Guide...a free download that will place the guide in your iBooks library as a great source of background information.

  • Menu letters disappeared (windows 7)

    In the latest versions of iTunes 10 menu letters simply disappeared from the bar (take a look at the picture) & search bar also stopped working. The rest of program works just fine, letters show. I guess it is related with usage of non-standard fonts in Windows 7, I turned off anti-aliasing and had to do it. There was a similar problem with letters disappearing from buttons in iTunes 9 that was fixed in later versions.
    Anyone having the same issue?

    Did you install all drivers? Specially the Power Management Driver should be installed from Lenovo Download area. Windows Update also offers the Power Management Driver, but that works worse with the Thinkpads than the Lenovo's. Remove it and then install the Power Management Driver from Lenovo.
    My home-forum: http://www.thinkpad-forum.de
    Wiki: Deutsches ThinkPad-Wiki English ThinkWiki
    My ThinkPad-Collection

  • Creating a customized Cancel Button

    I have a page with 2 regions.
    The 1st region has several text items and 2 buttons that are displayed conditionally.
    When the page first renders, Button A is displayed. The user then enters a value in one of the text items and clicks Button A. This displays the 2nd region. Button A then disappears and Button B appears.
    But I want the user to be able to start this process from scratch, i.e., have Button A appear on the form once again, with the form ready for him to enter another value in the text item and click Button A This is essentially just a Cancel button that returns the form back to its original state when the app was first entered.
    Can somebody please tell me how to do that?

    Hi Prohan
    You can add a button to a page that clears the cache of any page. What I think you are asking for is a button on page N that redirects to page N and also clears the cache on page N.
    To do this create a new button through the wizard and specify the page to re-direct to as the page you are adding the button to. When you've created the button you'll also have a branch created on this page for the button. Select the branch and in the Clear Cache section enter your page number.
    Alternatively, if you only want to clear some of the items on the page then create the button as above and leave the Clear Cache field empty. Instead enter the fields you want to clear in the 'Set these items' field and only enter comma's in the 'With these values' field. For example, to only clear fields 1, 2 and 3 enter
    Set these values - P1_ITEM1, P1_ITEM2, P1_ITEM3
    With these values - ,,
    Hope this helps.
    Sara
    http://www.apex-blog.com

  • Some Button Questions (AS2.0)

    I made a coloring book game in AS 2.0 (I did it this way so that I could put individual pieces of code for various buttons - there are around 50). I based it off a tutorial I found online. It works really well. These are the codes I used:
    In a top layer, I have just in frame 1 (there is only one frame in the whole thing):
    _root.fillColor = 0xFFFFFF;
    Each colorable part of the picture is a movie clip with a button inside, and each of those buttons has the following code:
    on (press) {
    color = new Color(this);
    color.setRGB(_root.fillColor);
    delete color;
    And then I have two color buttons they can "dip" their pointer into, then they can click on the colorable areas and color them. The code for the color buttons is:
    on (release) {
    _root.fillColor = 0xC71E07;
    _root.brush.gotoAndStop(8);
    Note: the hex code there is for the red button; it's different for the other color.
    Anyway, so this all works really well. What I need now are two buttons that I have NO idea how to make.
    Button 1: A "show answer" button that pops up a little graphic showing what their picture should look like. I know how to do this in AS 3.0 (I would just have the object fly in from off-stage on the button press), but not in 2.0. One thing I tried was to have it skip to a different scene or even just a different frame in which that object exists in place. The issue there is that it causes the coloring the user has done to disappear.
    Button 2: A "clear board" button that resets the whole thing. I've tried using the gotoandPlay(1) action with this button, but it doesn't do anything.
    Any help would be much appreciated. Thanks.

    Putting the code you gave me into my AS2.0 project, I get the following errors and no output:
    Scene=Scene 1, layer=buttons, frame=1, Line 4     Statement must appear within on handler
    Scene=Scene 1, layer=buttons, frame=1, Line 2     Statement must appear within on handler
    Scene=Scene 1, layer=buttons, frame=1, Line 1     Statement must appear within on handler
    This is the code I put on the button, just in case maybe there is some problem with it:
    trace(show)
    show.onRelease = fl_ClickToPosition;
    function fl_ClickToPosition()
         trace(Answer);
         Answer._x = 822.90;
         Answer._y = 187.50;
    (in this movie, the button to show answers is called "show" and the graphic that shows the answer is called "Answer")
    I put this into another game I made in AS3.0 (the one I'm having drag-drop issues with) and it gives the following compiler error:
    Scene 1, Layer 'Actions', Frame 1, Line 93 1119: Access of possibly undefined property onRelease through a reference with static type flash.display:SimpleButton.
    If I just keep my code as-is (on the AS3.0 one) but add the trace function to the answersflyin, it works the same as it did before and the output says [object MovieClip].
    Thanks for all the help, by the way. I have no idea what I'm doing; learning on the job.

  • Opening Form in Insert mode but making a query at the same time

    My problem is that I want to open a Portal Form in Insert mode but at the same time making a query.
    If I call a form with patameters the form opens automatically in update mode (to be more precise with FORMSTATE = UPDATE_AND INSERT). In that case the insert button is not shown.
    I have come very close to a solution by running this code:
    BEGIN
    p_session.set_value(
    p_block_name => 'DEFAULT',
    p_attribute_name => '_FORM_STATE',
    p_value => 'QUERY_AND_INSERT');
    END;
    under "... before processing the form". The form-state changes to QUERY_AND_INSERT' and I get the record from the table that I want but I still see no insert button!
    I think that I can solve this problem in some table-triggers in the database but it would be interesting to know weather it is possible to do this in the portal.

    Kari,
    You can workaround the disappearing Insert button by creating a custom button instead.
    If you look at the "standard" Insert button code it looks like this:
    --- Type your PL/SQL code here...
    doInsert;--- This is the default handler
    --- ...and here, thanks...
    in the generated forms package doInsert just calls internal insert handler:
    procedure doINSERT
    is
    begin
    onINSERT(
    p_block_name => p_block_name ,
    p_object_name => p_object_name,
    p_instance => p_instance ,
    p_event_type => p_event_type ,
    p_user_args => p_user_args ,
    p_session => p_session);
    end doINSERT;
    If you add a custom button to your form and from PLSQL event combobox select "Custom", then copy&paste this code to the event code:
    onINSERT(
    p_block_name => p_block_name ,
    p_object_name => p_object_name,
    p_instance => p_instance ,
    p_event_type => p_event_type ,
    p_user_args => p_user_args ,
    p_session => p_session);
    You will get a custom button which does exactly what the Insert button does and it will not disappear from the screen.
    Thanks,
    Dmitry

  • Move location of disabled item

    I have a edit box placed on the front panel to log text message. Depending on the status of a boolean button, the edit box appears and disappears (the button enables or disables the edit box when it is pushed).
    After the first time I place the edit box in place, I am not able to see it on the front panel. I have to go back to the block diagram and find the icon, double click on it and the front panel will show a dashed rectangle representing the position of the edit box. How do I change the edit box size and location?
    Thanks,
    Ryan
    Solved!
    Go to Solution.

    You need to find the control or indicator right click and change the status to Show Indicatior See picture.
    Tim
    Johnson Controls
    Holland Michigan

  • I get question marks instead of French accents

    Here is an example: [http://www.st-cergue.ch/index.php?option=com_docman&Itemid=42]

    If I put Unicode (UFT-8), it doesn't work any better.
    If I put Occidental (ISO-8859-1), the question marks disappear on buttons and in the page tab, but all French accents in the text are transformed in weird characters...
    I don't see the question marks on http://en.wikibooks.org/wiki/Unicode/Character_reference/0000-0FFF, but some characters between Unicode 4.0 to 6.0 are not translated.

  • Standalone application questions

    Hi,
    Question 1:
    I have a data acquisition application using Labview. Four analog channels are recorded on HDD and displayed on waveform chart continuously.
    Development application runs fine but standalone application on DELL laptop has problems: waveform does not show proper Grids; sometimes vertical and horizontal grid lines are broken. There is no problem recording data but only problem is displaying waveform.
    The same standalone application used to run without any problem but after some minor modification, it behaves strange.
    Any suggestions to fix the waveform display problems will be greatly appreciated.
    Question 2:
    �VI Property > Customize Windows Appearance > Show abort button� unchecked will disappear ABORT
    button from VI. .After standalone application compilation and installation, the ABORT button was visible. How hide the ABORT button on the standalone application.
    Question 3:
    Can I replace Labview default RUN button with custom button, I want to hide Labview default RUN button and want to make a separate RUN button. Can I access property node or local variable of that RUN button?
    Thanks in advance,
    Kishor

    About question 1.
    I had some strange behaviour with charts and transparent backgrounds.
    Perhaps it's something like this...
    About question 2.
    Perhaps you have made a build script that has the properties set. After
    changing the VI, loading the build script might overwrite the VI settings.
    About question 3.
    You should modify the VI to wait for a button to be pressed (a while, 10 MS
    wait, and a button). Let the VI start automatically (run when opened). This
    has the same effect.
    Regards,
    Wiebe.
    "Jeremy Braden" wrote in message
    news:[email protected]..
    > 1. The VI may have been corrupted after your minor changes. Do you
    > have an old copy of the good code. You can also copy the block
    > diagram of th
    e bad VI to a new VI and build an executable from the new
    > VI. Also do you see the same behavior with the classic waveform
    > chart? What happens if you build a new LV executable with dummy
    > information going to the chart?
    > 2. The tests I ran showed that you can make the abort button
    > invisible with the steps you mentioned. Do you think that you may
    > have not saved your changes?
    > 3. You cannot replace the run arrow. Atleast not from a nice
    > integrated published solution sort of way. There are no properties
    > for the run arrow.

Maybe you are looking for