Using a Variable with BEX Java Applications

If I put a variable into a query and try to run the query using anything Java based (e.g. Web analyzer) when I do a drop down on the variable in the query to make a selection I dont get a proper selection choice. For example if I have a variable on Cost Centre I do the drop down on cost centre and I dont get a list of cost centres to chose from I just get ?? where the cost centres should be. If I select a ?? it does select a cost centre. It's just pot luck which you selec as they are all ??!  This happens on any variable I use SAP Standard or any I have created. Any ideas - sounds like a Java patch should fix it but I cant see anything in SAP notes etc.

I put a query in a WAD or when I Execute a Query from the Query designer.  When I run the query the variable on the filter kicks in and it requests I select something e.g. cost centre. When I do the drop down in the variable to select a cost centre I dont get a list of cost centres. Only ?? where a cost centre should be. However when I select a ?? it does know what the cost cejtre is as it populates the variable with a cost centre. All the cost centre data is loaded etc.

Similar Messages

  • Using bind variable with IN clause

    My application runs a limited number of straight up queries (no stored procs) using ODP.NET. For the most part, I'm able to use bind variables to help with query caching, etc... but I'm at a loss as to how to use bind variables with IN clauses. Basically, I'm looking for something like this:
    int objectId = 123;
    string[] listOfValues = { "a", "b", "c"};
    OracleCommand command = new OracleCommand();
    command.Connection = conn;
    command.BindByName = true;
    command.CommandText = @"select blah from mytable where objectId = :objectId and somevalue in (:listOfValues)";
    command.Parameters.Add("objectId", objectId);
    command.Parameters.Add("listOfValues", listOfValues);
    I haven't had much luck yet using an array as a bind variable. Do I need to pass it in as a PL/SQL associative array? Cast the values to a TABLE?
    Thanks,
    Nick

    Nevermind, found this
    How to use OracleParameter whith the IN Operator of select statement
    which contained this, which is a brilliant solution
    http://oradim.blogspot.com/2007/12/dynamically-creating-variable-in-list.html

  • Time Format using text variable with replacement path

    Hi Friends,
                                 I've used "Text variable with replacement path" to make the column heading dynamic by replacing the values referring from "0calday"...
    everything is working fine, but here it is displaying the time format like
    YYYYMMDD (20030101), i want it to be displayed DDMMYYYY (01012003) in the column heading... how to make it possible?
    pls waiting for ur inputs, it's an urgent...
    Regards,
    Pattnaik

    Hi Satyakam,
    In the text variable properties make sure that in the replacment path you have chosen "Text" to appear date as per user setting . Other wise as in your case it must be set to "Key" which always shows in the format YYYYMMDD.
    Hope that helps.
    Regards
    Mr Kapadia

  • How to use shared variables with native c programs

    Hello
    What is the way to use shared variables with native c programs?
    I have a c/c++ program that uses the NIDAQmx C-API to perform measurements. Now I want to communicate to a LabVIEW program via shared variables.
    Is there a C-API for shared variables as there is for the NIDAQmx functionality? Where can I find further documentation? The document "Using the LabVIEW Shared Variable" mentions that one "can read and write to shared variables in ANSI C", but there are no hints about how and where to look.
    Thanks in Advance

    Hi user42,
    with CVI 8.0, you cannot create or configure shared variables. However, you can read or write to an already configured LabVIEW 8.x shared variable from CVI using the DataSocket API.
    In order to do this you need to have and DataSocket 4.3 or higher installed.
    Here's a forum post about using the DataSocket functions a LabVIEW Shared Variables:
    http://forums.ni.com/ni/board/message?board.id=180&message.id=24569&requireLogin=False
    With CVI 8.1 and Measurement Studio 8.1 it's possible to use Shared Variables via the Network Varaiable Library (check out the end of the "Network-Published Shared Variable" section within the "Using the LabVIEW Shared Variable" documentation and the following link).
    Datasocket with LabWindows/CVI and LabVIEW Real-Time:
    http://digital.ni.com/public.nsf/allkb/CC4343488413A2F586256E6200099638?OpenDocument
    Daniel
    NIG

  • How to use bind variables with XMLTABLE?

    I tried to use bind variables with xmltable statment. Here, my testcase:
    create or replace function wsdltest return xmltype as
    l_dummy xmltype;
    l_stt clob;
    l_name varchar2(500);
    l_xml clob;
    BEGIN
    l_xml :=
    '<definitions name="F1" targetNamespace="http://xmlns.oracle.com/orawsv/XFILES/F1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/orawsv/XFILES/F1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
    <xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/XFILES/F1" elementFormDefault="qualified">
    <xsd:element name="SVARCHAR2-F1Input">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="A-VARCHAR2-IN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="F1Output">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="RETURN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </types>
    <message name="F1InputMessage">
    <part name="parameters" element="tns:SVARCHAR2-F1Input"/>
    </message>
    <message name="F1OutputMessage">
    <part name="parameters" element="tns:F1Output"/>
    </message>
    <portType name="F1PortType">
    <operation name="F1">
    <input message="tns:F1InputMessage"/>
    <output message="tns:F1OutputMessage"/>
    </operation>
    </portType>
    <binding name="F1Binding" type="tns:F1PortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="F1">
    <soap:operation soapAction="F1"/>
    <input>
    <soap:body parts="parameters" use="literal"/>
    </input>
    <output>
    <soap:body parts="parameters" use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="F1Service">
    <documentation>Oracle Web Service</documentation>
    <port name="F1Port" binding="tns:F1Binding">
    <soap:address location="http://localhost:8080/orawsv/XFILES/F1"/>
    </port>
    </service>
    </definitions>';
    -- OK
    l_stt := 'select * from xmltable(XMLNAMESPACES(''http://www.w3.org/2001/XMLSchema'' AS "XSD", default ''http://schemas.xmlsoap.org/wsdl/''),
    ''//definitions/types/XSD:schema/XSD:element[@name="SVARCHAR2-F1Input"]''
    passing xmltype(:1)
    columns
    ab xmltype path ''.'' ) t';
    EXECUTE IMMEDIATE l_stt INTO l_dummy using l_xml;
    -- ERROR ORA-01006
    l_name := '"SVARCHAR2-F1Input"';
    l_stt := 'select * from xmltable(XMLNAMESPACES(''http://www.w3.org/2001/XMLSchema'' AS "XSD", default ''http://schemas.xmlsoap.org/wsdl/''),
    ''//definitions/types/XSD:schema/XSD:element[@name=:2]''
    passing xmltype(:1)
    columns
    ab xmltype path ''.'' ) t';
    EXECUTE IMMEDIATE l_stt INTO l_dummy using l_xml, l_name;
    return l_dummy;
    END;
    Any idea ?
    Thanks in advance
    Cyryl

    Why are you using dynamic SQL statements? Why not just use something like this instead in your PL/SQL. I also replaced the leading // in your Xpath with just / since you start from the root node.
    select *
      INTO l_dummy
      from xmltable(XMLNAMESPACES('http://www.w3.org/2001/XMLSchema' AS "XSD", default 'http://schemas.xmlsoap.org/wsdl/'),
                    '/definitions/types/XSD:schema/XSD:element'
                    passing xmltype(l_xml)
                    columns
                    ab xmltype path '.' ) t;Also, the above returns two rows, which I suspect is not what you want. Here is the pure SQL version for you to debug.
    select *
      from xmltable(XMLNAMESPACES('http://www.w3.org/2001/XMLSchema' AS "XSD", default 'http://schemas.xmlsoap.org/wsdl/'),
                   '/definitions/types/XSD:schema/XSD:element'
                   passing xmltype('<definitions name="F1" targetNamespace="http://xmlns.oracle.com/orawsv/XFILES/F1" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/orawsv/XFILES/F1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
    <xsd:schema targetNamespace="http://xmlns.oracle.com/orawsv/XFILES/F1" elementFormDefault="qualified">
    <xsd:element name="SVARCHAR2-F1Input">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="A-VARCHAR2-IN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="F1Output">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="RETURN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    </types>
    <message name="F1InputMessage">
    <part name="parameters" element="tns:SVARCHAR2-F1Input"/>
    </message>
    <message name="F1OutputMessage">
    <part name="parameters" element="tns:F1Output"/>
    </message>
    <portType name="F1PortType">
    <operation name="F1">
    <input message="tns:F1InputMessage"/>
    <output message="tns:F1OutputMessage"/>
    </operation>
    </portType>
    <binding name="F1Binding" type="tns:F1PortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="F1">
    <soap:operation soapAction="F1"/>
    <input>
    <soap:body parts="parameters" use="literal"/>
    </input>
    <output>
    <soap:body parts="parameters" use="literal"/>
    </output>
    </operation>
    </binding>
    <service name="F1Service">
    <documentation>Oracle Web Service</documentation>
    <port name="F1Port" binding="tns:F1Binding">
    <soap:address location="http://localhost:8080/orawsv/XFILES/F1"/>
    </port>
    </service>
    </definitions>'
                   columns
                   ab xmltype path '.' ) t

  • Using a variable with "tell application"

    I'd like to use a variable (app_name) with "tell application" in the following function:
    on getAdobeDoc(app_name)
    tell application app_name
    tell current document
    return (name as Unicode text)
    end tell
    end tell
    end getAdobeDoc
    but I'm getting the following error in Script Editor
    "Expected end of line but found class name." with the word "document" highlighted.
    Are you allowed to use variables in "tell application"? All Adobe CS apps seem to use the same format to get the document name so I'd like to use one function to get them.

    If the application might have a different name on the target machine (for example, if it has a version number added), you can use an application's bundle identifier (or creator code) to set the variable, in which case the using terms from statement tells AppleScript the application (on your machine) to get the dictionary terms from. If the application you are using terms from has a dictionary identical to your variable, everything should work the same. The following example uses a variable (called, appropriately enough, TexttEdit) for the TextEdit application:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    tell application "Finder" to set TextEdit to the name of application file id "com.apple.TextEdit"
    tell application TextEdit
    using terms from application "TextEdit"
    launch
    make new document with properties {text:"This is a test"}
    end using terms from
    end tell
    </pre>

  • Use Sun Java Studio 2 with Existing Java Application

    I have started using Sun Java Studio 2 and having fun and little difficulty creating a new Java web application from scatch. My question is where do I find information on Java Studio configuration to allow Java Studio to load up and modify Java server pages/forms in an existing Java application that I did not write?
    The Java application has been created with Javabeans and using BEA Weblogic version 7, with a SQL-Server 2000 database backend.
    Below is a bit of code out of one of the main Java forms.
    <%@ page buffer="256kb" autoFlush="false" errorPage="../../common/system/error.jsp"
    import="psdi.jsp.beans.*, psdi.jsp.common.*, psdi.jsp.app.wotrack.*, psdi.jsp.util.* , psdi.mbo.* , psdi.util.* "%>
    I have looked around and have not found what I need to setup in Java Studio to allow me to load up a form and view it in the Visual designer, I keep getting errors on the psdi. references and cannot load up any pages.
    I see on the server install ia folder under the main root <DIR> called <apps>, and inside the <apps> folder is a folder called <jsp> and in the <jsp> folder are sub folders for each main module within the application with all the related .jsp files. I have been manually editing the .jsp files using Windows Notpad and saving the changes. Then I rebuild the .ear file and my changes work fine. Since I have a lot of changes to make there has to be a better way than using Notpad.
    My hope is somewhere is a point-by-point document on what to so I can use Sun Java Studio 2 to make my changes in a visual IDE.
    Any assistance would really be appreciated.

    Hi Giri,
    Yep, this I know,b ut when I do I get errors messages and am looking for some form of point-bypoint instuction that better explains how to setup up custom libraries in Sun Java Studio, custom tags, etc.

  • Using a Variable with AJAX

    Hello,
    Below I have posted code that I have on two different PHP files, tsearch12.php and votes12.php. The code works great. The file "tsearch12.php" uses AJAX to go to votes12.php to perform some functions. However, the first page has a variable called "find." These two pages only work together when the variable "find" equals "santafe." I would like them to work together regardless of what "find" equals. In other words, I would like to replace the table name "santafe" in votes12.php with the variable "find," but I want the variable "find" to equal the same value in both tsearch12.php and votes12.php. The variable "find" is going to tsearch12.php from another file, which has a simple HTML form with "<form action="tsearch12.php" method="post">" and "<input type="text" name="find" size="55"/>". Anyway, how do I use the variable "find" in votes12.php?
    Thanks in advance,
    John
    On tsearch12.php, I have:
    # <head> 
    # <script type='text/javascript' src='jquery.pack.js'></script> 
    # <script type='text/javascript'> 
    # $(function(){ 
    #     $("a.cell1").click(function(){ 
    #     //get the id 
    #     the_id = $(this).attr('id'); 
    #     // show the spinner 
    #     $(this).parent().html("<img src='images/spinner.gif'/>"); 
    #     //fadeout the vote-count  
    #     $("span#votes_count"+the_id).fadeOut("fast"); 
    #     //the main ajax request 
    #         $.ajax({ 
    #             type: "POST", 
    #             data: "action=vote_up&id="+$(this).attr("id"), 
    #             url: "votes12.php", 
    #             success: function(msg) 
    #                 $("span#votes_count"+the_id).html(msg); 
    #                 //fadein the vote count 
    #                 $("span#votes_count"+the_id).fadeIn(); 
    #                 //remove the spinner 
    #                 $("span#button"+the_id).remove(); 
    #     $("a.vote_down").click(function(){ 
    #     //get the id 
    #     the_id = $(this).attr('id'); 
    #     // show the spinner 
    #     $(this).parent().html("<img src='images/spinner.gif'/>"); 
    #     //the main ajax request 
    #         $.ajax({ 
    #             type: "POST", 
    #             data: "action=vote_down&id="+$(this).attr("id"), 
    #             url: "votes12.php", 
    #             success: function(msg) 
    #                 $("span#votes_count"+the_id).fadeOut(); 
    #                 $("span#votes_count"+the_id).html(msg); 
    #                 $("span#votes_count"+the_id).fadeIn(); 
    #                 $("span#button"+the_id).remove(); 
    # </script> 
    # </head> 
    # <body> 
    # <? 
    # //This is only displayed if they have submitted the form 
    # if ($searching =="yes") 
    # //If they did not enter a search term we give them an error 
    # if ($find == "") 
    # echo "<p>You forgot to enter a search term"; 
    # exit; 
    # // Otherwise we connect to our Database 
    # mysql_connect("mysqlv3", "username", "password") or die(mysql_error()); 
    # mysql_select_db("sand2") or die(mysql_error()); 
    # $find = strip_tags($find); 
    # $find = trim ($find); 
    # $result=mysql_query("SHOW TABLES FROM sand2 LIKE '%$find%'") 
    # or die(mysql_error()); 
    # if(mysql_num_rows($result)>0){ 
    # while($table=mysql_fetch_row($result)){ 
    # print "<p class=\"topic\">$table[0]</p>\n"; 
    # $r=mysql_query("SELECT * FROM `$table[0]`"); 
    # print "<table class=\"navbar\">\n"; 
    # while($row=mysql_fetch_array($r)){ 
    # $effective_vote = $row['votes_up'] - $row['votes_down'];  
    # print "<tr>"; 
    # print "<td>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>"; 
    # print "<td class='votes'>".'<span class="votes_count" id="votes_count'.$row['id'].'">'.number_format($effective_vote).'</span>'."</td>"; 
    # print "<td class='ballot'>".'<span class="button" id="button'.$row['id'].'">'.'<a href="javascript:;" class="cell1" id="'.$row['id'].'">'.Vote.'</a>'.'</span>'."</td>"; 
    # print "</tr>\n"; 
    # print "</table>\n"; 
    # else{ 
    # print "None found"; 
    # $anymatches=mysql_num_rows($result); 
    # if ($anymatches == 0) 
    # echo "Sorry, but we can not find an entry to match your query<br><br>"; 
    # ?>    On votes12.php, I have:
    # <?php 
    # mysql_connect("mysqlv3", "username", "password") or die(mysql_error()); 
    # mysql_select_db("sand2") or die(mysql_error()); 
    # function getAllVotes($id) 
    #     Returns an array whose first element is votes_up and the second one is votes_down
    #     $votes = array(); 
    #     $q = "SELECT * FROM santafe WHERE id = $id"; 
    #     $r = mysql_query($q); 
    #     if(mysql_num_rows($r)==1)//id found in the table 
    #         $row = mysql_fetch_assoc($r); 
    #         $votes[0] = $row['votes_up']; 
    #         $votes[1] = $row['votes_down']; 
    #     return $votes; 
    # function getEffectiveVotes($id) 
    #     Returns an integer
    #     $votes = getAllVotes($id); 
    #     $effectiveVote = $votes[0] - $votes[1]; 
    #     return $effectiveVote; 
    # $id = $_POST['id']; 
    # $action = $_POST['action']; 
    # //get the current votes 
    # $cur_votes = getAllVotes($id); 
    # //ok, now update the votes 
    # if($action=='vote_up') //voting up 
    #     $votes_up = $cur_votes[0]+1; 
    #     $q = "UPDATE santafe SET votes_up = $votes_up WHERE id = $id"; 
    # elseif($action=='vote_down') //voting down 
    #     $votes_down = $cur_votes[1]+1; 
    #     $q = "UPDATE santafe SET votes_down = $votes_down WHERE id = $id"; 
    # $r = mysql_query($q); 
    # if($r) //voting done 
    #     $effectiveVote = getEffectiveVotes($id); 
    #     echo $effectiveVote; 
    # elseif(!$r) //voting failed 
    #     echo "Failed!"; 
    # ?>  

    These forums are for development with Java. Not JavaScript, which is an entirely different language. And AJAX is JavaScript. You need to use Google and find a JavaScript forum for your question (or a PHP forum if your question is really about PHP).

  • Using XML schema in a Java application

    Hi,
    I need to parse and use an XML schema in an application, mainly for helping a user to build an XPATH.
    For that, I want to use the Schema classes bundled with Oracle's parser. Is there any documentation about that ? Or are the source code available ?
    Thank's
    Phil.

    See the JavaHelp article on my site.
    I had developers saying they had to have JavaHelp for their
    Java application. After discussion we established that for where
    this was going to be used, webhelp was just as acceptable. Being
    easier for us that won the day.

  • Different languages used while uploading file from java Application

    Hi everybody,
    i have a problem with multiple languages , let me clear you the question, i were developing a java application using spring ,hibernate frame works, so i got a problem while uploading a file with chinees language or other
    it was saving with different format other than chiness in the database, can any one help me out ... i need the exact language when i upload the files,and when i get the data from DataBase which is in chinees language is '걨' going to be like as '???'
    thank you very much

    Santhosh_25 wrote:
    using utf-8 characterSet, but its not showing properly
    thank youOkay.. the problem with your browser settings.. (not sure)..
    In firefox try to set character encoding...
    go to View--->Character Encoding--->Unicode (UTF-8)..
    In IE
    go to View--->Encoding-->More-->Unicode (UTF-8)
    set this and try.

  • Use shared variables with FPGA device on Host PC

    Hi all I am having a frustrating problem. I am trying to use shared
    variables linked to a cRIO 9012. The shared variables were created and
    then written to in a RT vi. is there any way I can assign locations to
    these not within a RT vi. I altimately need to run the Host vi on a
    TPC-2512 touch panel computer and I can't run a RT application on that. I
    just need the variables to update without the RT vi running and I can't
    figure out how to do that, if its even possible. Here is what I have so
    far. Thank you in advance for your help.
    Attachments:
    PumpMonitoringDevice.zip ‏2083 KB

    Adam:
    You may be able to use arrays to speed up your program, but bear in mind that the TPC is pretty much guaranteed to be slower than your computer (as it's likely to have lower system specs).
    You'll want to use the array manipulation functions to combine and retrieve your data (most useful will likely be "Build Array" and "Index Array," see context/LabVIEW help for more details). Once you have the data in an array, you can likely pass it through a shared variable configured for an array datatype.
    I'm not sure if/how much of a speed boost it will give you, but I think it's definitely worth trying. If you're not sure about the speed, try simply cutting your variable count in half and see what kind of speed increase you get with the same amount of code but fewer variable values being transmitted through your network connection.
    Good luck!
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

  • Integrating Sun Java Directory Server with Sun Java Application Server 7

    Hi,
    My basic goal is to implement Single Sign On within the network i,e if the user is inside the company's network and tries to access any application, then he should not be required for Username/password again becuase he is in the network.
    My question is Is this possible with Sun Java System DIrectory server. If yes how can we integrate Directory Server with Sun Java System Application Server 7 2004Q2.
    Please help.
    Thanks

    Directory Server in itself doesn't provide any kind of SSO functions. Basically it is a high performing data repository accessible via LDAP and DSML. It is, however, a key component used by SSO applications like Access Manager. If your applications are web applications then take a look at Access Manager for your SSO needs.
    Regards,
    Scott

  • How to use a variable where some Java API expects an integer value ???

    Hi all,
    This may not be a proper forum to submit this query but since its a Java related problem & there are many experience people, I hope I can get some good hint and advice to solve this problem.
    I have to pass an integer value to a SPARQL query. I am using Allegrograpg API for Java application. But I am receiving the value in a variable and query accepts it as an integer. How can this kind of problem be solved. I put query under so you can see it.
    " SELECT DISTINCT ?Pattern ?Model WHERE" +
    "{ ?class rdfs:subClassOf [ owl:onProperty :locationID; " +
    " owl:hasValue \"1000\"^^xsd:int ]."+........
    The query expects an integer as has value.
    My apology again for posting it here but since its a Java releted problem, I hope some body can give me some good advice.....

    Ahhh, I don't think it is so terrible, it just depends where from is coming the variable that you are interpolating.
    The main reason for using PreparedStatement is efficiency. If you want to be safe from SQL injection you just have to do a simple REGEX substitution over the SQL string.
    --janeiros                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with BEx Web Application Designer

    Hi,
    we use since last week the Web Application Designer with the SAP GUI 7.2.
    Now I have a big problem since last week. I can call existing templates but unfortunately not change! I make a change in the template and save it. When I viewed the template again but no change is saved!
    A new template I can create and change
    Does anyone know the problem? The behavior also occurs with the old Gui 7.1.
    Regards
    Edited by: Jana VOGL on Oct 18, 2010 10:14 AM

    Hi Jana,
    Do you get any error before opening of an existing template in WAD? Doesn't look to be a problem with the different SAP GUI versions. Maybe somethings gone wrong with the Java - ABAP config settings or Java Portal communication settings. Maybe you should check with your BASIS team on the same. Tell them what the problem is & they will run a trace to figure out.
    --Priya

  • How do I bundle fonts with my java application?

    I have a strange problem... I'm writing a java application with GUI (using swing btw, but that doesn't have anything to do with it :) ) and I'm using some fonts that obviously aren't standard on all operating systems. That's too sad, because now my program looks different in different environments.
    Now, the logical solution would be to load the fonts to be used from files included in the distribution package... but I can't find any way to do that! Just creating a Font object doesn't let you choose to take it from a file... but rather from the operating system itself. (Heck, I thought java was supposed to be independent from the OS.) So what do I do now? It would be really nice to be able to write programs that look the same in all environments, without being restricted to using the five (was it five?) standard java fonts...
    I'm desperate! This should be an easy problem to solve... with all the wonderful features of the java API there should be an easy way to do this.
    I just can't find it...
    Please... help! :) If you know a soultion, you could for example send me an email... at [email protected]
    /Erik (crazy Swede)

    you may load the System font list and then check if your GUI fonts are available, or use a predefined index a this list...
    example:
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    // That�s the OS font list
    String[] fontNames = ge.getAvailableFontFamilyNames();
    JComboBox fontList = new JComboBox(fontNames);hint: the Serif and Roman fonts are JVM native ones... and you may use them at any OS...

Maybe you are looking for

  • IOS4 Has messed up my equalizer settings

    Ever since updating to iOS4 on my 3GS, my equalizer settings are all very, VERY quiet. Even the setting Loudness is about half as quiet as when I have the Equalizer turned off completely. All other settings are acting similarly. Anyone else having th

  • More than 1 blank line available for input in IP-Excel based?

    Hello, We are converting a large BW-BPS application (> 200 active users) to IP. A major requirement is the availability of the "blank screen" in Excel, similar to the BPS standard screen, where users can cut-and-paste multiple lines into it. IP - Exc

  • Cant create JDBC Connections in RMI Server

    I am having a pretty weird problem which I am struggling with for the last three days. In the main method of the Server object, following three things are supposed to happen: 1) Creation of a JDBC Connection 2) Creation of a Remote Object and then pu

  • Why Download does not start for Mavericks in app store ?!?!

    I tries many times to download MAvericks OS from app-store but after clicking  "free uograde" it turned to green "instal app" button and then nothing... I surrently  use Mac OS 10.6.8.

  • Updating xml ( again...)

    I know that there are zillions post about this but I got a bit confused... My problem is, I need to change a node value and write back to the xml file. I used this code to save the changes back in the file: TransformerFactory xformFactory  = Transfor