How use JLabel and JCombobox on one string

package ReplacementCode;
import java.awt.BorderLayout;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
class MainFrame extends JFrame {
private static JTextArea text = new JTextArea(ReadingFromFile.textFromFile.size(), 40);
private static JScrollPane forText = new JScrollPane(text);
private static JPanel westPanel = new JPanel();
private static JPanel forAlphabet = new JPanel();
private static JPanel forModifyChars = new JPanel();
private static JLabel[] labels = new JLabel[Alphabet.russianAlphabet.length()];
private static Object[] massiveOfAlphabet = new Object[Alphabet.russianAlphabet.length()];
private static JComboBox[] comboBoxes = new JComboBox[Alphabet.russianAlphabet.length()];
private static JButton startButton = new JButton("!заменить!");
private static BoxListener[] boxListeners = new BoxListener[Alphabet.russianAlphabet.length()];
public MainFrame() {
super("оснвовное окно");
setDefaultCloseOperation(EXIT_ON_CLOSE);
initiasizeCenter();
initiasizeWest();
JLabel jlab = new JLabel(Alphabet.russianAlphabet.toUpperCase());
jlab.setOpaque(true);
add(forText, BorderLayout.CENTER);
add(westPanel, BorderLayout.WEST);
add(startButton, BorderLayout.SOUTH);
add(jlab, BorderLayout.NORTH);
setSize(this.getMaximumSize());
setVisible(true);
private void initiasizeWest() {
putAlphabet();
forModifyChars.setLayout(new BoxLayout(forModifyChars, BoxLayout.Y_AXIS));
forAlphabet.setLayout(new BoxLayout(forAlphabet, BoxLayout.Y_AXIS));
for(int ii = 0; ii < Alphabet.russianAlphabet.length(); ii++) {
comboBoxes[ii] = new JComboBox(massiveOfAlphabet);
comboBoxes[ii].setSelectedIndex(ii);
boxListeners[ii] = new BoxListener();
comboBoxes[ii].addKeyListener(boxListeners[ii]);
forModifyChars.add(comboBoxes[ii]);
StringBuffer sb = new StringBuffer();
sb.append(Alphabet.russianAlphabet.charAt(ii));
labels[ii] = new JLabel(sb.toString().toUpperCase());
labels[ii].setOpaque(true);
labels[ii].setHorizontalTextPosition(JLabel.LEFT);
labels[ii].setVerticalTextPosition(JLabel.CENTER);
westPanel.add(forAlphabet);
westPanel.add(Box.createHorizontalGlue());
westPanel.add(forModifyChars);
private static void initiasizeCenter() {
text.setLineWrap(true);
for(int ii = 0; ii < ReadingFromFile.textFromFile.size(); ii++)
text.append(ReadingFromFile.textFromFile.elementAt(ii) + "\n");
private static void initiasizeSouth() {}
private static void initiasizeNorth() {}
private static final void putAlphabet() {
for(int ii = 0; ii < Alphabet.russianAlphabet.length(); ii++)
massiveOfAlphabet[ii] = Alphabet.russianAlphabet.charAt(ii);
private class BoxListener implements KeyListener {
public BoxListener() {
public void keyPressed(KeyEvent e) {
System.out.println("&#1089;&#1083;&#1091;&#1096;&#1072;&#1077;&#1090;&#1083;&#1100; &#1085;&#1072;&#1078;&#1072;&#1090;&#1080;&#1103; &#1082;&#1083;&#1072;&#1074;&#1080;&#1096;&#1080; : " + e + "\n");
public void keyReleased(KeyEvent e) {
System.out.println("&#1089;&#1083;&#1091;&#1096;&#1072;&#1077;&#1090;&#1083;&#1100; &#1086;&#1090;&#1087;&#1091;&#1089;&#1082;&#1072;&#1085;&#1080;&#1103; &#1082;&#1083;&#1072;&#1074;&#1080;&#1096;&#1080; : " + e + "\n");
public void keyTyped(KeyEvent e) {
System.out.println("&#1089;&#1083;&#1091;&#1096;&#1072;&#1077;&#1090;&#1083;&#1100; &#1087;&#1077;&#1095;&#1072;&#1090;&#1072;&#1085;&#1080;&#1103; &#1089;&#1080;&#1084;&#1074;&#1086;&#1083;&#1072; : " + e + "\n");
package ReplacementCode;
import java.util.Vector;
abstract class Alphabet {
final static String russianAlphabet = new String("&#1072;&#1073;&#1074;&#1075;&#1076;&#1077;&#1105;&#1078;&#1079;&#1080;&#1081;&#1082;&#1083;&#1084;&#1085;&#1086;&#1087;&#1088;&#1089;&#1090;&#1091;&#1092;&#1093;&#1094;&#1095;&#1096;&#1097;&#1098;&#1099;&#1100;&#1101;&#1102;&#1103;");
private static String replacementAlphabet;
private static double[] ratesOfCharacters = new double[russianAlphabet.length()];
static Vector<String> replacementedText = new Vector<String>();
static final void generateAlphabetOfReplacement() {
boolean[] occupancy = new boolean[russianAlphabet.length()];
for(int ii = 0; ii < occupancy.length; ii++)
occupancy[ii] = false;
char[] ancillaryMassiveOfCharacters = new char[russianAlphabet.length()];
for(int ii = 0; ii < ancillaryMassiveOfCharacters.length; ii++) {
for(;;) {
int ancillaryPositionOfCharacter = (int) (Math.random() * ancillaryMassiveOfCharacters.length);
if(occupancy[ancillaryPositionOfCharacter] == false) {
occupancy[ancillaryPositionOfCharacter] = true;
ancillaryMassiveOfCharacters[ii] = russianAlphabet.charAt(ancillaryPositionOfCharacter);
break;
replacementAlphabet = new String(ancillaryMassiveOfCharacters);
static final void workWithText(Vector<String> unreplacementText) {
generateAlphabetOfReplacement();
nullingOfRates();
replacementedText.removeAllElements();
for(int ii = 0; ii < unreplacementText.size(); ii++) {
char[] occupancyMassive = unreplacementText.elementAt(ii).toCharArray();
for(int jj = 0; jj < occupancyMassive.length; jj++) {
//verification of agreement of character's in text with basic alphabet
for(int kk = 0; kk < russianAlphabet.length(); kk++) {
if(Character.isUpperCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == Character.toUpperCase(russianAlphabet.charAt(kk))) {
occupancyMassive[jj] = Character.toUpperCase(replacementAlphabet.charAt(kk));
ratesOfCharacters[kk]++;
break;
if(Character.isLowerCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == russianAlphabet.charAt(kk)) {
occupancyMassive[jj] = replacementAlphabet.charAt(kk);
ratesOfCharacters[kk]++;
break;
//save new replacemented text
replacementedText.add(new String(occupancyMassive));
//            System.out.println(unreplacementText.elementAt(ii));
//            System.out.println(replacementedText.elementAt(ii));
static final void workWithText(Vector<String> unreplacementText, String oldAlphabet, String newAlphabet) {
nullingOfRates();
replacementedText.removeAllElements();
for(int ii = 0; ii < unreplacementText.size(); ii++) {
char[] occupancyMassive = unreplacementText.elementAt(ii).toCharArray();
for(int jj = 0; jj < occupancyMassive.length; jj++) {
//verification of agreement of character's in text with basic alphabet
for(int kk = 0; kk < oldAlphabet.length(); kk++) {
if(Character.isUpperCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == Character.toUpperCase(oldAlphabet.charAt(kk))) {
occupancyMassive[jj] = Character.toUpperCase(newAlphabet.charAt(kk));
ratesOfCharacters[kk]++;
break;
if(Character.isLowerCase(unreplacementText.elementAt(ii).charAt(jj)) &&
occupancyMassive[jj] == oldAlphabet.charAt(kk)) {
occupancyMassive[jj] = newAlphabet.charAt(kk);
ratesOfCharacters[kk]++;
break;
//save new replacemented text
replacementedText.add(new String(occupancyMassive));
//            System.out.println(unreplacementText.elementAt(ii));
//            System.out.println(replacementedText.elementAt(ii));
private static void nullingOfRates() {
for(int ii = 0; ii < ratesOfCharacters.length; ii++)
ratesOfCharacters[ii] = 0;
}the problem is in westPanel; how we can typed text from the Jlabel near JCombobox
now - text from combobox we can see, and text from label - don't.
and one of condition is don't crash massive of JCombobox and Jlabel
please help me

if if was different mod then only create many vertical Jpanels, with pair jlabel, jcombobox, please write...i don't want to do this because it wil bee many references on Jpanels-> many memory..

Similar Messages

  • Shell script how getopts can accept more than one string in one var

    In shell script   how  getopts  can  accept  more than one string in one variable    DES
    Here is the part of shell script that accepts variables  from the Shell script  but the   DES   variable does not accepts more than one variable.,  how to do this ??
    When i run the script like below
    sh Ericsson_4G_nwid_configuration.sh   -n  orah4g    -d   "Ericsson 4g Child"    -z Europe/Stockholm
    it does not accepts    "Ericsson 4g Child"    in  DES  Variable   and only accepts    "Ericsson"  to DES variable.
    how to make it accept     full   "Ericsson 4g Child" 
    ========================================
    while getopts “hn:r:p:v:d:z:” OPTION
    do
      case $OPTION in
      h)
      usage
      exit 1
      n)
      TEST=$OPTARG
      z)
      ZONE="$OPTARG"
      d)
      DES="$OPTARG"
      v)
      VERBOSE=1
      usage
      exit
      esac
    done

    Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code
    Also, see http://mywiki.wooledge.org/Quotes

  • Functionality of JFormattedTextField and JComboBox in one control

    Hi,
    I am developing a component which shall switch from JFormattedField to JComboBox as per requirements. For example, If a single value is used then the component acts like a JFormattedTextField and if array of values is used then the component acts like a JComboBox.
    One way of doing this is to create a new class sub-classing JComponent, create both the above mentioned objects and then implement all the methods (inherited as well as sum of methods/properties of both the components) by forwarding the call to the JFormattedTextField or JCombobox or both.
    Can somebody suggest a better design.
    Thanks in advance! Good day!
    RKON

    almost2good wrote:
    How can I make Lion show a space number on the top of the screen so I can see which space I am in?
    Currently you cannot.
    almost2good wrote:
    How can I make Lion switch spaces in a ring? ie? 1, 2, 3, 4, 5, 6, 1, 2, 3,  ...
    You cannot organise Mission Control's "Desktops" this way. They are organised in a single row to allow the swipe gestures to work. Apple allows no way to customise this.
    almost2good wrote:
    How can I make lion switch directly to a numbered space?  ie: 1, 4, 5, 2, etc...
    By deafult you should be able toi switch by pressing ctrl plus the desktop number, e.g. ctrl+1. This is the same as Spaces in Snow Leopard. You can customise this under System Preferences (Keyboard > Keyboard Shortcuts > Mission Control).
    almost2good wrote:
    Without these three capabilities Mission Control is a giant step backward....I am disappointed in the way it works and would liketo know how to disable it and give me back the way spaces used to work.
    A lot of people are disapointed with Mission Control. In my opinion it's a step backwards from Spaces & Expose in Snow Leopard but peoples views on this will depend if they used Spaces & Expose in Leopard/Snow Leopard and the type of Mac they are using - it makes some sense on a Macbook Air, for example, with a small screen and multi-touch trackpad but not so much on an iMac or Mac Pro (sames goes for Launchpad). I just hope Apple listens to the criticism and enables customisation options to change the way Mission Control behaves.

  • Example for Using WDR_SELECT_OPTIONS and SALV_WD_TABLE in one View

    Hello,
    I need an Example for Using the WD-Components WDR_SELECT_OPTIONS and SALV_WD_TABLE
    in one view. Can anybody help me?
    Thanks
    Toto

    Hello,
    Please see these:
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3439404a-0801-0010-dda5-8c14514d690d]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/21706b4b-0901-0010-7d93-c93b6394bc1d]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/39c54fe7-0b01-0010-0eb6-d63ac2bdd637]
    [/people/rich.heilman2/blog/2005/12/20/using-select-options-in-a-web-dynproabap-application]
    [/people/thomas.jung3/blog/2005/12/21/webdynpro-abap-alv]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8]
    Regards.

  • Performance Issue using min() and max() in one SQL statement

    I have a simple query that selects min() and max() from one column in a table in one sql statment.
    The table has about 9 Million rows and the selected column has a non unique index. The query takes 10 secs. When i select min() and max() in separate statements, each takes only 10 msecs:
    This statement takes 10 secs:
    select min(date_key) , max(date_key)
    from CAPS_KPIC_BG_Fact_0_A
    where date_key != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
    This statement takes 10 msecs:
    select min(date_key)
    from MYTABLE
    where date_key != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
    union all
    select max(date_key) from MYTABLE
    Because the first statement is part of an autmatic generated SQL of an application, i can't change it and i have to optimize the data model. How can i speed up the first statement?

    I've ran similar query on a table that has 10 milliion rows, with an index on the date column
    This is what I have found:
    SQL> set timing on
      1  SELECT MIN(ID_DATE) MIN_DATE, MAX(ID_DATE) MAX_DATE
      2      FROM MY_DATE
      3*     WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
    SQL> /
    MIN_DATE  MAX_DATE
    03-APR-76 06-JAN-02
    real: 43383
    SQL> SELECT MIN(ID_DATE) MIN_DATE FROM MY_DATE
      2   WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
      3  UNION ALL
      4  SELECT MAX(ID_DATE) MAX_DATE FROM MY_DATE
      5   WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD'))
      6  /
    MIN_DATE
    03-APR-76
    06-JAN-02
    real: 20
    SQL> SELECT MIN_DATE, MAX_DATE FROM
      2  (SELECT MAX(ID_DATE) MAX_DATE FROM MY_DATE
      3  WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD')) ) A,
      4  (SELECT MIN(ID_DATE) MIN_DATE FROM MY_DATE
      5  WHERE ID_DATE != TO_DATE(('1900-1-1' ),( 'YYYY-MM-DD')) ) B
      6  /
    MIN_DATE  MAX_DATE
    03-APR-76 06-JAN-02
    real: 10
    SQL> My conculsion, there is nothing you can do to the tables that will improve that particular statement.
    Why can't you modify the application?

  • I signed up for 20 bucks a month to use photoshop and only got one day of use.  Where does that get

    I signed up for 20 bucks a month and only got one day of use of Photoshop.  Where does that get off?

    What error are you receiving?  Do you have a subscription to Photoshop CS6?

  • How ı use wiktionary and google translate 6.3.2 with firefox os or android with all functions.ı want to select a word and then want to see the translate.

    ı am using wiktionary and Google translate 6.3.2 add on at Firefox.it makes my work very easy.ı only double click on a word and then opens a window near the word and ı can see the meanings.ı really really want a Firefox OS Mobil device.and ı want to use a Google translate easy like this.ı do not want to copy text to clipboard and then type to search area and then search.when ı select a word browsing at the web.ı must easily translate and see the meaning.ı do not want to copy to clipboard.ı am wanting Firefox os like crazy.ı want to use Firefox OS like using Firefox at PC at my Mobil device.ı want a tablet with Firefox OS.thanks.good works.

    ı am using wiktionary and Google translate 6.3.2 add on at Firefox.it makes my work very easy.ı only double click on a word and then opens a window near the word and ı can see the meanings.ı really really want a Firefox OS Mobil device.and ı want to use a Google translate easy like this.ı do not want to copy text to clipboard and then type to search area and then search.when ı select a word browsing at the web.ı must easily translate and see the meaning.ı do not want to copy to clipboard.ı am wanting Firefox os like crazy.ı want to use Firefox OS like using Firefox at PC at my Mobil device.ı want a tablet with Firefox OS.thanks.good works.

  • CL_GUI_ALV_GRID Problems when using enter and f4 in one ALV

    Hi guys,
    i have the following problem:
    I Use a ALV, which has a column MATNR. The ALV provides the standard search help for this field automatically. so far so good. BUT i also need to read additional data, such as GLD, Material shortext etc, when the users presses the Enter Key.
    Here is my coding:
          CLASS lcl_events DEFINITION
    CLASS lcl_events_0300 DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_data_changed
                FOR EVENT data_changed OF  cl_gui_alv_grid
                IMPORTING er_data_changed sender.
    ENDCLASS.                    "lcl_events DEFINITION
    The problem that occurs: if i select a material via f4, i just can add one material to the alv. if i place the cursor into the second line, press f4 again, the alv overwrites the MATNR in the first line
    i think the problem has to do with the fact, that the alv runs throug my enter event, when pressing f4.
    thats how i registered my event:
      g_o_alv_grid_bart_0300->register_edit_event(
      EXPORTING
       " i_event_id = g_o_alv_grid->MC_EVT_MODIFIED ).
         i_event_id = g_o_alv_grid->mc_evt_enter ).
    ...und EventHandler zuweisen
      CREATE OBJECT g_o_alv_events_0300.
      SET HANDLER g_o_alv_events_0300->handle_data_changed FOR g_o_alv_grid_bart_0300.
    kind regards, mark
    Edited by: Mark Wagener on Aug 19, 2010 11:39 AM
    Edited by: Mark Wagener on Aug 19, 2010 11:40 AM

    Sorry for forgetting the impl. part of the class!
          CLASS lcl_events_0300 IMPLEMENTATION
    CLASS lcl_events_0300 IMPLEMENTATION.
      METHOD handle_data_changed.
    HandleDataChanged                  ***
        DATA: ls_good                TYPE lvc_s_modi.
         FIELD-SYMBOLS: .
    alle Inhalte der geänderten Zellen in die interne Tabelle schreiben
        LOOP AT er_data_changed->mt_good_cells INTO ls_good.
    Dazu auf die richtige Zeile in der ITAB positionieren:
          READ TABLE  INDEX ls_good-row_id.
          IF sy-subrc = 0.
    Und das geänderte Feld dem Feldsymbol zuweisen
            ASSIGN COMPONENT ls_good-fieldname OF STRUCTURE .
            IF sy-subrc = 0.
    Feldwert zuweisen
              -matnr
            AND bwkey = werks.
      ENDLOOP.
    Und neu ausgeben
        g_o_alv_grid_bart_0300->refresh_table_display( ).
      ENDMETHOD.                    "handle_data_changed

  • How Useful, Effective and Stable is the Node Function

    Please note my current MacPro below.
    I'm seriously thinking about purchasing a used ("Refurbished") MacPro similar to the one below to help share the sequencing workload. Of course, there are a number of ways to setup the the second MacPro computer to share the workload. One of them is to use the Node Function.
    The manual states that utilizing the Node function will help with the CPU workload of software synths. If I understand the manual correctly, all that needs to be done is to initialize the node function after connected the second Apple computer to the first via the Ethernet cable. I have a number of instrumental libraries that uses Native-Instrument's Kontakt 2 sampler software (GPO, JABB, Kirk Hunter "Diamond" orchestral libraries, Chris Hein Guitars, etc., etc.) I like ALL of these libraries but they do definitely put a drain on the computer's CPU resources.
    So. . . Here are my questions.
    How effective is using the Node function to help "share the workload"?
    Putting into consideration that the second MacPro computer will be similar to the one noted below, how many more orchestral instruments (using the Kontakt 2 software) can I expect to load within a project using the Node function?
    It looks like the purchased second "refurbished" MacPro will have the Leopard operating system loaded on it. (I plan on purchasing it from Apple.) I am reluctant to "upgrade" my current computer from Tiger to Leopard. What problems/issues, if any, might one expect if the primary computer runs with the Tiger operating system and the secondary computer runs with the Leopard operating system???
    Please share your trouble or success story regarding your usage of the Node function.
    Thank you!
    Ted

    I'm able to communicate between the MacPro and the Dell workstation using Music Lab's MidiOverLan 3 software. It looks like I'll be using a similar setup for that second MacPro.
    Yes, a solution like that is what I would recommend in your situation, and pipe the audio back in via an audio interface (you can go the networked audio route if you wish, but I haven't found it a particular stable or workable solution so far - it's a bit random - going via digital or even analog on a second audio interface to bring in the remote audio is more solid, although obviously your limited in the number of channels to independently bring over (you'll probably need to submix at least).
    Bee Jay, thank you very much for the reply and the muchly needed "head's up"!
    You're welcome!

  • Regular expressions-how to replace [ and ] characters from a string

    Hi,
    my input String is "sdf938 [98033]". Now from this given string, i would like to replace the characters occurring within square brackets to empty string, including the square brackets too.
    my output String needs to be "sdf938" in this case.. How should I do it using regular expressions? I tried several possible combinations but didn't get the expected results.

    "\\s*\\[[^\\]]+\\]"

  • How used join and projection in TC3.

    Hi to all experts,
    my quarry is that why Time Constraint 3 infotypes(pa0021) are not used in join and projection. i hope we may used with where clause subty and objps. in this way we may be used. if we should not be used explain me. then next how can we process these type of records. Please explain me in detail.
    Best Regards:
    Mahesh

    Hi LightwaV - the best place to get support for the Adobe Education Exchange is to go through the Help Center on the AEE - http://edex.adobe.com/help-center/. Once there you can navigate through the help items to find answers to common questions and if you're problem isn't solved, you can email the AEE support team. They will be in a better position to help you and troubleshoot your account.
    Hope this helps!

  • How use two templantes with only one job ?

    I have two templantes and want use with only one job.I use with input one xml data file !!
    Is this possible?
    Please Help!!
    Thanks,
    Bruno.

    I probably missed this one earlier or felt that since it referenced an XML data file that I couldn't provide a definitive answer. I'm still not sure I can because we don't use XML for our data files, but use the "field nominated format".<br /><br />An expansion on Tammy's information:<br /><br />1. use a multi-step job with each <br />b task<br />calling a different MDF.<br />With this correction, it assumes that you either have access to set up the tasks/jobs yourself or can convince your Central administrator to do so. What happens is that TASKA is set up to reference FORMA and TASKB is set up to reference FORMB. Then a job is set up that causes both TASKA & TASKB to be ran. This will likely result in two different print files being sent to the printer. That may or may not be desirable, depending on whether your printer is set up to do something special between each print file (insert separator page, offset, whatever). Personally, I don't recommend this as it can quickly cause an unnecessary proliferation of tasks and jobs (we print 100's of differing form combinations with a single job definition).<br /><br />2. I can't really address this as I didn't even know that a single form could cause another to be called. I would expect that unless the "base" form (say it is FORMA) is to always print with the secondary form (FORMB) it is restrictive and has the potential to cause a proliferation of FORMA files for the various combinations that are to be printed. Maybe it is possible to have logic to check the value of a data field to control what forms get called.<br /><br />3. If you pass the XML file through a translation step and then through the transformation agent (maybe it can be done in a single step) this should work. It does add another step to the job as well as requiring learning to use the transformation agent. Depending on the combination of forms to be printed, you might need a different translation definition for each one, or at the very least have a data field that you can check the value of to determine what ^form commands to put in the output file.<br /><br />4. My recommendation is based on assuming an XML data file has the same capabilities as a field nominated file. Within a field nominated file are various print agent commands, including references to data as well as which forms are to be printed (and a whole bunch of other commands). An XML file should have the same features - I just can't say what they might look like. If your current data file has no "form" reference but depends on the job/task definition you might have to stick with option 1. If it has a "form" reference, then you just need to insert additional references for additional forms. Then it is up to the source of your data (or a transformation agent step) to specify which forms are to be printed. For example, in field nominated format, the file might look like:<br /><br />^job XYZ additional parameters<br />^form FORMA.MDF<br />^field FIELD1<br />data<br />^field FIELD2<br />data<br />^form FORMB.MDF<br />^field FIELD1<br />data<br />^field FIELD3<br />data<br /><br />or it might look like the way our files look:<br /><br />^job XYZ additional parameters<br />^global FIELD1<br />data<br />^global FIELD2<br />data<br />^global FIELD3<br />data<br />^form FORMA.MDF<br />^form FORMB.MDF<br /><br />As you can see in the first example, there is a reference to the form followed by all fields that go on it followed by another form reference with the fields that go on it. This particular method, using all "^field" commands for defining the data requires that data duplicated between the forms be duplicated. (Or, the use of some ^global commands like the following.)<br /><br />In the second example, all data is defined first using the "^global" command followed by all of the form references. This allows for the data to be defined only once. If there is something unique regarding a particular form the field can be ^global at the beginning or it can be ^field <br />b after<br />the ^form reference (similar to the first example).<br /><br />As previously mentioned, the XML file should have the same capability but in XML notation, something like the following (forgive me as it has been years since I took the XML class and don't use it in my daily work so the actual format could be wrong, not to mention the actual labels):<br /><br /><job name=XYZ,option=aaaa,option=bbbbbbb><br />  <form name=FORMA.MDF><br />    <field name=FIELD1, value=xxxxxxxxxxx></field><br />    <field name=FIELD2, value="xxxxxxxxxxxxx"></field><br />  </form><br />  <form name=FORMA.MDF><br />  etcetera<br /></job><br /><br />or maybe:<br /><br /><job name=XYZ,option=aaaa,option=bbbbbbb><br />  <global name=FIELD1,value=xxxxxxxxxxxx></global><br />  <global name=FIELD2,value="xxxxxxxxxxxxx"></global><br />  etcetera<br />  <form name=FORMA.MDF></form><br />  <form name=FORMB.MDF></form><br /></job><br /><br />or even (but I doubt it):<br /><br /><job name=XYZ,option=aaaa,option=bbbbbbb><br />  <globals><br />    name=FIELD1,value=xxxxxxxxxxxxxxxx,<br />    name=FIELD2,value="xxxxxxxxxxxxxxx"<br />  </globals><br />  <forms><br />    name=FORMA.MDF,<br />    name=FORMB.MDF<br />  </forms><br /></job>

  • How use XSD and Java? What classes/methods?

    I want to use an XSD instead of a DTD with my XML and Java. Does anyone know the classes/methods I should use to do this? Is it even possible? Can you send sample code?

    here is the helper function... hope it helps...
    import java.io.IOException;
    import java.math.*;
    import java.text.*;
    import org.xml.sax.Attributes;
    import org.xml.sax.ContentHandler;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.Locator;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.XMLReaderFactory;
    public class SAXParserDemo
         public SAXParserDemo()
         public void performDemo(String uri)
              System.out.println("Parsing XML file: " + uri + "\n\n");
              ContentHandler contentHandler = new MyContentHandler();
              ErrorHandler errorHandler = new MyErrorHandler();
              try
                   XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
                   parser.setContentHandler(contentHandler);
                   parser.setErrorHandler(errorHandler);
                   parser.setFeature("http://xml.org/sax/features/validation", true);
                   parser.parse(uri);
              catch(IOException e)
                   System.out.println("Error reading URI: " + e);
              catch(SAXException e)
                   System.out.println("Error in parsing: " + e);
         public static void main(String[] args)
              if(args.length != 1)
                   System.out.println("Usage: java SAXParserDemo [XML URI]");
                   System.exit(0);
              String uri = args[0];
              SAXParserDemo parserDemo = new SAXParserDemo();
              parserDemo.performDemo(uri);
    class MyErrorHandler implements ErrorHandler
         public void warning(SAXParseException exception) throws SAXException
              throw new SAXException("Warning encountered."+exception);
         public void error(SAXParseException exception) throws SAXException
              throw new SAXException("Error encountered: "+exception);
         public void fatalError(SAXParseException exception) throws SAXException
              throw new SAXException("Fatal error encountered."+exception);
    class MyContentHandler implements ContentHandler
         private Locator locator;
         public void setDocumentLocator(Locator locator)
              //System.out.println("     * setDocumentLocator() called");
              this.locator = locator;
         public void startDocument() throws SAXException
              //System.out.println("System Message: Parsing begins...");
         public void endDocument() throws SAXException
              //System.out.println("System Message: ...Parsing ends.");
         public void processingInstruction(String target, String data) throws SAXException
              //System.out.println("System Message: PI: Target: "+target+" and Data: "+data);
         public void startPrefixMapping(String prefix, String uri)
              //System.out.println("System Message: Mapping starts on prefix "+prefix+" mapped to URI "+uri);
         public void endPrefixMapping(String prefix)
              //System.out.println("System Message: Mapping ends on prefix "+prefix);
         public void startElement(String namespaceURI, String localName, String rawName, Attributes atts) throws SAXException
              //System.out.println("System Message: startElement: "+localName);
              if(!namespaceURI.equals(""))
                   //System.out.println("System Message: in namespace "+namespaceURI+" ("+rawName+")");
              else
                   //System.out.println("System Message: has no associated namespace");
              int i;
              for(i=0;i<atts.getLength();i++)
                   //System.out.println("System Message: Attribute: "+atts.getLocalName(i)+"="+atts.getValue(i));
         public void endElement(String namespaceURI, String localName, String rawName) throws SAXException
              //System.out.println("System Message: endElement: "+localName+"\n");
         public void characters(char[] ch, int start, int length) throws SAXException
              String s = new String(ch, start, length);
              //System.out.println("System Message: characters: "+s);
         public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
              String s = new String(ch, start, length);
              //System.out.println("System Message: ignorableWhitespace: ["+s+"]");
         public void skippedEntity(String name) throws SAXException
              //System.out.println("System Message: Skipping entity: "+name);
    }

  • How to cut and paste from one PDF to another

    Acrobat Pro - 2 weeks ago I could cut and paste text from one PDF to another doc or PDF but now the cursor has disappeared and I only get a hand.  I can no longer highlight text. Is there something in the settings I can change?

    Is this one one pdf or all pdfs? Do you have the correct tool selected?

  • Sqlplus on debian how using wpad01 and Wpad02 (tnsmanager servers)

    Hi,
    We have too serveur (tnsmanager) and i need to use it with my sqlplus (oracle client) on my desktop client (debian)
    what must i do configuring to use it automaticaly ?
    On windows desktop i have this on my ldap.ora :
    DIRECTORY_SERVERS = (wpad01:3838,wpad02:3838)
    DEFAULT_ADMIN_CONTEXT = ""
    DIRECTORY_SERVER_TYPE = OID
    On my debian desktop ping successfull this too servers
    Edited by: 960562 on 21 sept. 2012 05:33

    Hi E,
    We only test against OID for our LDAP screen - you can put in an enhancement request for other LDAP products.
    -Turloch
    For Your Information:
    You can use advanced url to use the syntax mentioned in
    http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/urls.htm#CHDBICFA
    ie
    jdbc:oracle:thin:@ldap://ldap.acme.com:7777/sales,cn=OracleContext,dc=com
    [There is also a thick/oci driver equivalent syntax]

Maybe you are looking for

  • Displaying Dollar sign in ALV

    How to add the dollar sign infront of field with data type currency (CURR) ? Need to display the amount field in the ALV report. Please suggest any solution. Thanks, Khush Edited by: khush123 on Sep 22, 2011 11:49 AM

  • Pdf disappears in firefox window

    Hi Folks, I have Acrobat Pro 8.1.2 on XP SP2 and I'm running firefox 2.0.0.13. When I open a pdf which pops up in another firefox window, everything seems fine. However, if I go back to my original firefox window and open or close a tab, when i go ba

  • Tour calendar does not keep entries "forever"

    Can anyone tell me how to fix an issue I am having with a new Tour where the past calendar entries only show for 60 days even though I have selected the "Forever" option?  In the Verizon forum, someone suggested it could be a low memory issue and tha

  • PO released dates by releases ?

    Dear MM gurus, Request pl let me know is there any Standard Report to see the PO Releases along with dates & release levels with sap user id. (PO releases history) Pl help thanx in advance regards Srihari

  • No DataTimeDigitized value in movies as is in photos?

    In a photo there is a metadata value that shows the date the photo was shot, that is different from when the file was created, so you don't have to worry if you copy or change the file later and the date of the it changes, since the date of the shot