Need a Jbutton object with TWO text labels??

Hi
I have a major problem I need to create a JButton object that takes two string as argument
MyButtonClass(String a, String b);
I do not have a clue how to do this... the reason I need this is that I have ttf(true type font) file each character refers to an Icon....so the first string argument will be character that refers to appropriate icon and the second argument the label of the button...
just as the JButton(String text, Icon icon) object...but I do not have a clue how to create an Icon of a character that refers to icon in the ttf file...(I do not think this is possible?)
I hope some one can give me clue how to this.
Thanks

Hi there
I don't know what you are trying to say maybe you can clarify so that I might be able to help you. As I understand it you have button that must take in to parameters when it is created. These parameters then will say which icon has to be set with font that has been selected.
This may sound stupid but why don't you create an Icon in (Paint Shop Pro or someting similar) that contains the text with the Icon and then just read the jpg file in as you normally would. Thus just having the switch statement or if statement making the rules for when a specific Icon should be selected.
I may be wrong but that is what I would do.

Similar Messages

  • Creating a button with a text label layer

    Hi guys.  Looking for any tips on how best to implement a button with a text label.  I initially created a rectangle object on a lower layer and with text in the upper layer via type tool.  When I group both objects and create the button the text is readable in my InDesign (document) computer screen but the minute I preview it on my iPad the button becomes unreadable and pixellated.  I tried various approaches by moving the text layer outside the button group does not display the text at all.  Has anyone run into this issue?  If so what is the best practice?  Thanks in advance.

    Thanks for the insight Neil.  Regarding my button design its nothing fancy.  Its a rectangle box on one layer and a text label on another layer inside the rectangle object.  What I'm trying to simulate is when the user taps on the button the click state will change colour to notify the user that they have activated an event and in this case a navto://...
    The way I've implemented it is the rectangle is coloured pink [Normal] and when tapped the light pink [Click] toggles between both colours BUT my text label disappears. 
    See the screen shots below.

  • Question on "text flow" with two text fields:

    Hi Folks,
    I was hoping you could help me to see if this is possible with Livecycle Designer, any assistance would be much appreciated:
    I'm populating a dynamic pdf and have the need to have multiple lines of text composed of two text fields (name and description) where name is bold text followed by description in regular text for example:
    Item 1 Name Sample: This is the item one description, adding some lorem ipsum text to show how it would flow across multiple lines here Lorem ipsum dolor sit amet, defunctam.Lorem ipsum dolor sit amet, ingens ad te ad nomine Hesterna. Pentapoli naves non ait Cumque ego dum. Scelus patrem in rei.
    Item 2 Name Sample: This is the item two description, adding  some lorem ipsum text to show how it would flow across multiple lines  here Lorem ipsum dolor sit amet, defunctam.Lorem ipsum dolor sit amet,  ingens ad te ad nomine Hesterna. Pentapoli naves non ait Cumque ego dum.  Scelus patrem in rei exultant deo apprehendit in fuerat construeret in  rei sensibilium acciperem qui enim est se vero diam ille. Agimus nolo me  testatur sed. Descendi eam ad.
    Item 3 Name Sample: This is the item three description, adding  some lorem ipsum text to show how it would flow across multiple lines  here Lorem ipsum dolor sit amet, defunctam.Lorem ipsum dolor sit amet,  ingens ad te ad nomine Hesterna. Pentapoli naves non ait Cumque ego dum.  Scelus patrem in rei.
    I have a subform for each item that contains two fields [itemName] [itemDescription], is there any way to do this without combining them into one textfield with rich text on?
    Thanks,

    Hi Phill,
    You could use floating fields, where the inputs are hidden and bound to your incoming XML. In the visible {} fields, you can set one of these to bold. The advantage would be that the two displayed floating fields will flow depending on the content.
    Have a look at the second example in this form: http://assure.ly/iuYifq
    Hope that helps,
    Niall

  • SQL Subscription field shows * only with Dynamic Text Label in SQL query

    We are using Hyperion Analyzer 7.2.x for showing budget and actual data. I have to show this financial data based on the security e.g. person in IT can see only IT dept. data. Hence I want to use dynamic text label <<userid>> for the security based on the person logging in to Analyzer.
    But when I use dynamic text label <<userid>> in the SQL query in SQL Spreadsheet, SQL Subscription field shows * only selection option. Does anyone have idea how to solve this problem?
    Thanks in advance for your help.
    -SV

    Hi
    Okay i know this is a bit crazy way.....but i think this is the solution for your issue.
    Create a report without the where clause (<<useris>>) then add a filter (sql subscription) then you can find all the values that are there in the SQL field (try to increase the query limit it is set to 250 as default) then edit the spreadsheet and add the where clause (<<userid>>).
    This will help you having the filter and the dynamic text label. I think there is an issue when you try to filter it with a where clause.
    Hope it helps.
    CK

  • JButton rendered with HTML text takes longer to load

    I have a JButton that displays text rendered in HTML.
    ie. JButton but1 = new JButton("<html><STYLE=\"font-family: Dialog; font-size: 12pt\"><center>Current<br>Date</center></STYLE></html>");
    The reason for the STYLE tag is so that the font matches the rest of the application (instead of defaulting to Times New Roman).
    As a result of including the HTML tags, the dialog containing the panel with my buttons takes noticeably longer to load (especially when it's my login dialog).
    Does anyone know why this takes longer to render or if there is some way around it?
    Interesting to note: One unexpected outcome of using the HTML tags is that it sets all my buttons to the same width (they are in a BoxLayout.Y_AXIS layout), whereas before, they refused to have their size set at all and were all different.

    Okay, well I worked out a way around my problem - don't use HTML.
    The only reason I was using HTML was to allow me to have multi-line buttons. Using HTML also had the added problem of the text not showing the enabled-state of the button (ie. the text did not appear disabled) or the Mnemonic.
    I have created a subclass of JButton that creates multiple lines using JPanels instead of HTML.

  • Object with External Text

    I am new to Flash/ActionScript and hope I can explain this
    problem, because I am completely lost as to what went wrong. I am
    working on a hurricane tracker.
    First I have comboBoxes with a list of storm names, when
    selected an XML file is loaded and tracks the storm, using
    different color mc's for the storm's intensity.
    Then I have some buttons that when clicked, pop-up a white
    background and load some external text.
    The problem is that both of these work, until one of the
    storms in the comboBox is selected, then the pop-up will not work.
    I'm sorry for the inability to phase this in
    ActionScript-speak, but appreciate any help and thanks in advance.

    Can you attach some code wrt the combobox and the buttons and
    how they command other movie elements?

  • Combining a chart's image JPEG with a text label?

    Hi
    I am creating a JPEG file of a chart's plot. This works fine using the 'Write JPEG File'.
    As I have 8 charts in the VI to save to file, I have identified eact one using the label text. This appears OK when running but after saving the charts to file there is just a black rectangle (see attachment.
    Anyway around this?
    Thanks Harry.
    Attachments:
    PARR1_91420071355.jpg ‏23 KB

    This is because the background color defaults to black.
    Wire a color box to the BG Color input of the Get Image method.
    Or, make the label white.
    Or, use a purple or green color as background, and Create Mask to mask out
    that color.
    Or, put the label on the graph instead of above it.
    Regards,
    Wiebe.

  • Problem with showing unit-label

    Hi All,
    i just have a problem with controls that have two displays (like
    slider). I need the digital display with an unit-label. But when I
    enable showing the label it appears two times and I have no chance to
    disable one. Is there a methode that I can reach my target?
    bye
    Henrik

    There is a way but it rather looks like a bug in LabVIEW...
    The object must be a control and the VI must be in Run Mode or running:
    Select the text in the unit label of the digital display and delete it.
    It can generate insane object errors if you manipulate the object further,
    thus it is safer just to hide the label.
    Jean-Pierre Drolet
    John Lum a écrit dans le message :
    [email protected]..
    > Henrik Skupin wrote:
    >
    > > i just have a problem with controls that have two displays (like
    > > slider). I need the digital display with an unit-label. But when I
    > > enable showing the label it appears two times and I have no chance to
    > > disable one. Is there a methode that I can reach my target?
    >
    > Others may have a more
    elegant way of getting around this, but one quick
    > workaround is to edit the control to hide the unit label that you don't
    > want to see.
    >
    > Let's say you want to hide the unit label next to the slider part of the
    > control: simply select the control, do Edit >> Edit Control, move the
    > offending unit label over top of the digital display, then select Move to
    > Back from the Reorder menu.
    >
    > Regards,
    > John Lum
    > National Instruments
    >

  • How to add the value of the two text boxes in the 3rd text box in ssrs table?

    Hi ,
    in my ssrs table i encountered a situation where i need to computing for the two text box values and i have to show that value in page header.
    for example i have to add the textbox9 value and textbox12 value then i have to show that value in the page header.
    Please help me with this requirement.
    Thanks in advance,
    Naveen

    Hi NaveenMSBI,
    According to your description, you want to sum the value of two textboxes, then display it in a page header textbox.
    Just PrajapatiNeta said, an expression in a page header or footer can refer to only one report item. So we can create a hidden textbox named textbox20 with the expression below in the report body:
    =reportitems!textbox9.Value + reportitems!textbox12.Value
    Then use the expression below in a page header textbox:
    =reportitems!textbox20.Value
    Besides, please note that in a page header or page footer section, only text boxes on the current page are available as a member of the ReportItems collection. For example, if ReportItems!textbox20.Value refers to a text box that only appears on the first
    page for a multipage data region, you can see a value only for the first page.
    Reference:
    ReportItems Collection References (Report Builder and SSRS)
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Dropdown with two rawValues

    Is it possible to have a dropdown list object with two rawValues?
    For example:
    John Smith is the diplayed name and the rawValues are his email address and authorized spending limit (5000).
    [email protected], 5000
    If yes, I want the 5000 dollars to appear in textfield1 and the email address in textfield2. How do I access them?

    You should only get the commas you need, unless there is data in the other columns?
    I use CSV files quite a lot for mail-merge applications and sometimes get extras rows at the bottom but never seen a bunch of commas like that.
    Maybe try selecting the three columns of data and paste into a new spreadsheet and save as CSV. The only thing I can think of is if you have extra columns with titles that might be causing it - usually with CSV the first row is used for naming the columns.

  • Object with multiple states and slider in folio are rasterized, settings seem correct.

    I am having trouble keeping An object with multiple text states from being rasterized, as well as a slider that is also rastering.
    I have read that you are supposed to set the folio and article up to be .pdf and that the slider should have the vector option chosen.
    I haven't found anything for the multi state object to for these settings.
    What happens is when I output the folio to Adobe Content Viewer, only the text in those items is rasterized. All other text is crisp. Tested on both iPad Mini and iPad Retina and the both are blurry.
    Is there a way to force the vector option? It seems even with the correct options selected it is still rastering the test in interactive elements.
    Thanks!

    Here is the MSO with the folio.
    Here is the Slider with folio overlays panel.

  • How to call PL/SQL stored procedure with TWO or more arguments from URL?

    Hi all,
    does anybody know, how to call stored procedure with more than one argument?
    How to do this with one argument is known -
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#" width="70" height="80" alt="No Picture">
    But if I need to call procedure with two formal parameters? And need to pass through URL, for example, two page item values?

    Just separate with an "&". Using your previous example, I'll add i_name and i_type:
    <img src="#OWNER#.retreive_img_data?i_id=#IMG_ID#&i_name=somename&i_type=jpg" width="70" height="80" alt="No Picture" />
    Tyler

  • [cs3][JS]Find Enter with no text in Layout

    Hi,
       I need to find enter with no text(idle) in a Layout.I have used the following code.
            app.findGrepPreferences = NothingEnum.nothing;
            app.changeGrepPreferences = NothingEnum.nothing;
            app.findGrepPreferences.findWhat ="\n";
            app.findChangeGrepOptions.includeFootnotes = false;
            app.findChangeGrepOptions.includeHiddenLayers = false;
            app.findChangeGrepOptions.includeLockedLayersForFind = false;
            app.findChangeGrepOptions.includeLockedStoriesForFind = false;
            app.findChangeGrepOptions.includeMasterPages = false;
            var myFoundItems=new Array;
            myFoundItems=app.activeDocument.findGrep();
            var len=myFoundItems.length;
            alert(len);
    I don't know whether my approach is correct or not? Please suggest me.
    Regards
    Kumar

    hi Kumar,
    you need to find "double enter" and then process second paragraph in each found result - but you need to process found items backward
    or if you want to find empty TextFrames - you wont find them in this way - becuase empty TFs are empty no enter or any other characters
    robin
    www.adobescripts.co.uk

  • Change inbound IDoc 860 overlay the old text with new text

    Currently whenever change inbound IDoc 860 gets posted new text gets appended. My requirement is: old text needs to be overwritten with new text.  Can you please advice
    Thanks

    Hi Hock,
    thanks for your answer. Unfortunately i think your are right.
    Yesterday i got an answer from debopriyo mallick, does anyone know,
    why this answer is dissapear?
    Regards, Dieter

  • Submit a program with two variants

    Hi all,
    There is one program which needs to run everyday with two different variants
    ( For this i need to have two jobs ).
    Now, i need to write a new program which submits the above program with two variants. How do i do it?
    Thanks
    Abhijith H

    You don't need two jobs, you can have 1 job with two steps,  each step would call the progam with the different variant.
    If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement.  Here VARIANT1 is the name of a variant.
    SUBMIT ZREPORT01
           USING SELECTION-SET 'VARIANT1'
           AND RETURN.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Net Price showing zero while using BAPI_PO_CREATE1 for me21n

    Dear All, I am using BAPI_PO_CREATE1 for ME21N. The problem is, after execution of the program the error msg it shows- No instance of object type PurchaseOrder has been created. External reference: Purchase order still contains faulty items Net price

  • Installing CF9 on Windows Server 2008 Standard 64-bit

    Hi- I'm attempting to  install a new ColdFusion configuration with a host who is useless  regarding the support that they offer (for now, they shall remain  nameless). It's a Windows Server 2008 Standard 64 bit VPS  configuration. MySQL is already in

  • COPA update of KAUFN with purchase order number

    Hello After SAP upgrade from 6.00 to 6.04 the purchase order is no longer displayed/saved in field KAUFN and KDPOS in the profitability document. So far this functionality has worked perfectly for stock transfer orders. I have search for SAP notes wi

  • Remove orhpaned master references?

    Hello all, A while back i deleted a folder from Finder containing multiple images and the referenced masters in Aperture became orphaned. I then opened aperture and deleted the orphaned masters (i deleted the folder after importing the images into th

  • Html source

    I'm new to apex.. I had written my HTML source code in the html body attribute section that is available in the page.. i had created a link.. this link i want it to appear in the main region(reports region).. but it appears at top of my page while i