Read baseline of PICT file

Hi,
We are doing math project. we extract the equation using mathtype, and export the equation as PICT file format. We successfully imported the equation into indesign. But the problem is the equation not aligned properly. i check the previous threads, in eps file they are given baseline information of the file but where as in pict file format i didn't find that so i can't align the equation.
can anyone help me how to get the baseline information from PICT file format.
Note: Previously we used eps file but, when we import into indesign some of the symbols (greek variables varphi, mu) are missing. So we import the equation into pict file format these symbols are available in indesign.
Thanks in Advance,
Parthiban

Hi All,
Any Solution for this?
Regards,
Parthiban

Similar Messages

  • Problem with ArrayLists and writing and reading from a .dat file (I think)

    I'm brand new to this forum, but I'm sure hoping someone can help me with a problem I'm having with ArrayLists. This program was originally created with an array of objects that were displayed on a GUI with jtextFields, then cycling thru them via jButtons: First, Next, Previous, Last. Now I need to add the ability to modify, delete and add records. Both iterations of this program needed to write to and read from a .dat file.
    It worked just like it was suppose to when I used just the array, but now I need to use a "dynamic array" that will grow or shrink as needed: i.e. an ArrayList.
    When I aded the ArrayList I had the ArrayList use toArray() to fill my original array so I could continue to use all the methods I'd created for using with my array. Now I'm getting a nullPointerException every time I try to run my program, which means somewhere I'm NOT filling my array ???? But, I'm writing just fine to my .dat file, which is confusing me to no end!
    It's a long program, and I apologize for the length, but here it is. There are also 2 class files, a parent and 1 child below Inventory6. This was written in NetBeans IDE 5.5.1.
    Thank you in advance for any help anyone can give me!
    LabyBC
    package my.Inventory6;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.text.DecimalFormat;
    import javax.swing.JOptionPane;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import java.io.*;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.lang.IllegalStateException;
    import java.util.NoSuchElementException;
    import java.util.ArrayList;
    import java.text.NumberFormat;
    // Class Inventory6
    public class Inventory6 extends javax.swing.JFrame {
    private static InventoryPlusColor[] inventory;
    private static ArrayList inList;
    // create a tool that insure the specified format for a double number, when displayed
    private DecimalFormat doubleFormat = new DecimalFormat( "0.00" );
    private DecimalFormat singleFormat = new DecimalFormat( "0");
    // the index within the array of products of the current displayed product
    private int currentProductIndex;
    /** Creates new form Inventory6 */
    public Inventory6() {
    initComponents();
    currentProductIndex = 0;
    } // end Inventory6()
    private static InventoryPlusColor[] getInventory() {
    ArrayList<InventoryPlusColor> inList = new ArrayList<InventoryPlusColor>();
    inList.add(new InventoryPlusColor(1, "Couch", 3, 1250.00, "Blue"));
    inList.add(new InventoryPlusColor(2, "Recliner", 10, 525.00, "Green"));
    inList.add(new InventoryPlusColor(3, "Chair", 6, 125.00, "Mahogany"));
    inList.add(new InventoryPlusColor(4, "Pedestal Table", 2, 4598.00, "Oak"));
    inList.add(new InventoryPlusColor(5, "Sleeper Sofa", 4, 850.00, "Yellow"));
    inList.add(new InventoryPlusColor(6, "Rocking Chair", 2, 459.00, "Tweed"));
    inList.add(new InventoryPlusColor(7, "Couch", 4, 990.00, "Red"));
    inList.add(new InventoryPlusColor(8, "Chair", 12, 54.00, "Pine"));
    inList.add(new InventoryPlusColor(9, "Ottoman", 3, 110.00, "Black"));
    inList.add(new InventoryPlusColor(10, "Chest of Drawers", 5, 598.00, "White"));
    for (int j = 0; j < inList.size(); j++)
    System.out.println(inList);
    InventoryPlusColor[] inventory = (InventoryPlusColor[]) inList.toArray
    (new InventoryPlusColor[inList.size()]);
    return inventory;
    } // end getInventory() method
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    IDNumberLbl = new javax.swing.JLabel();
    IDNumberField = new javax.swing.JTextField();
    prodNameLbl = new javax.swing.JLabel();
    prodNameField = new javax.swing.JTextField();
    colorLbl = new javax.swing.JLabel();
    colorField = new javax.swing.JTextField();
    unitsInStockLbl = new javax.swing.JLabel();
    unitsInStockField = new javax.swing.JTextField();
    unitPriceLbl = new javax.swing.JLabel();
    unitPriceField = new javax.swing.JTextField();
    invenValueLbl = new javax.swing.JLabel();
    invenValueField = new javax.swing.JTextField();
    restockingFeeLbl = new javax.swing.JLabel();
    restockingFeeField = new javax.swing.JTextField();
    jbtFirst = new javax.swing.JButton();
    jbtNext = new javax.swing.JButton();
    jbtPrevious = new javax.swing.JButton();
    jbtLast = new javax.swing.JButton();
    jbtAdd = new javax.swing.JButton();
    jbtDelete = new javax.swing.JButton();
    jbtModify = new javax.swing.JButton();
    jbtSave = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    searchIDNumLbl = new javax.swing.JLabel();
    searchIDNumbField = new javax.swing.JTextField();
    jbtSearch = new javax.swing.JButton();
    searchResults = new javax.swing.JLabel();
    jbtExit = new javax.swing.JButton();
    jbtExitwoSave = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Inventory Program"));
    IDNumberLbl.setText("ID Number");
    IDNumberField.setEditable(false);
    prodNameLbl.setText("Product Name");
    prodNameField.setEditable(false);
    colorLbl.setText("Product Color");
    colorField.setEditable(false);
    colorField.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    colorFieldActionPerformed(evt);
    unitsInStockLbl.setText("Units In Stock");
    unitsInStockField.setEditable(false);
    unitPriceLbl.setText("Unit Price $");
    unitPriceField.setEditable(false);
    invenValueLbl.setText("Inventory Value $");
    invenValueField.setEditable(false);
    restockingFeeLbl.setText("5% Restocking Fee $");
    restockingFeeField.setEditable(false);
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(unitPriceLbl)
    .addComponent(unitsInStockLbl)
    .addComponent(colorLbl)
    .addComponent(prodNameLbl)
    .addComponent(IDNumberLbl)
    .addComponent(restockingFeeLbl)
    .addComponent(invenValueLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(IDNumberField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(prodNameField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(colorField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(unitsInStockField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(unitPriceField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(restockingFeeField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE)
    .addComponent(invenValueField, javax.swing.GroupLayout.DEFAULT_SIZE, 176, Short.MAX_VALUE))
    .addContainerGap())
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(IDNumberLbl)
    .addComponent(IDNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(prodNameLbl)
    .addComponent(prodNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(colorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(colorLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(unitsInStockField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(unitsInStockLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(unitPriceField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(unitPriceLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(restockingFeeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(restockingFeeLbl))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(invenValueField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(invenValueLbl))
    .addContainerGap())
    jbtFirst.setText("First");
    jbtFirst.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtFirstActionPerformed(evt);
    jbtNext.setText("Next");
    jbtNext.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtNextActionPerformed(evt);
    jbtPrevious.setText("Previous");
    jbtPrevious.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtPreviousActionPerformed(evt);
    jbtLast.setText("Last");
    jbtLast.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtLastActionPerformed(evt);
    jbtAdd.setText("Add");
    jbtAdd.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtAddActionPerformed(evt);
    jbtDelete.setText("Delete");
    jbtModify.setText("Modify");
    jbtModify.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtModifyActionPerformed(evt);
    jbtSave.setText("Save");
    jbtSave.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtSaveActionPerformed(evt);
    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Search by:"));
    searchIDNumLbl.setText("Item Number:");
    jbtSearch.setText("Search");
    searchResults.setFont(new java.awt.Font("Tahoma", 1, 12));
    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(searchIDNumLbl)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(259, 259, 259)
    .addComponent(searchResults, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jbtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(searchIDNumbField, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(searchIDNumLbl)
    .addComponent(searchIDNumbField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addGap(32, 32, 32)
    .addComponent(searchResults, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtSearch)))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jbtExit.setText("Save and Exit");
    jbtExit.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtExitActionPerformed(evt);
    jbtExitwoSave.setText("Exit");
    jbtExitwoSave.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jbtExitwoSaveActionPerformed(evt);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jbtExitwoSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jbtExit)))
    .addGroup(layout.createSequentialGroup()
    .addComponent(jbtFirst)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtNext)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtPrevious)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtLast))
    .addGroup(layout.createSequentialGroup()
    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGap(12, 12, 12)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jbtAdd)
    .addComponent(jbtDelete)
    .addComponent(jbtModify)
    .addComponent(jbtSave))))
    .addContainerGap())
    layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jbtFirst, jbtLast, jbtNext, jbtPrevious});
    layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jbtAdd, jbtDelete, jbtModify, jbtSave});
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addGap(21, 21, 21)
    .addComponent(jbtAdd)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtDelete)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtModify)
    .addGap(39, 39, 39)
    .addComponent(jbtSave))
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(jbtFirst)
    .addComponent(jbtNext)
    .addComponent(jbtPrevious)
    .addComponent(jbtLast))
    .addGap(15, 15, 15)
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addGroup(layout.createSequentialGroup()
    .addComponent(jbtExit)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(jbtExitwoSave)))
    .addContainerGap())
    pack();
    }// </editor-fold>
    private void jbtExitwoSaveActionPerformed(java.awt.event.ActionEvent evt) {                                             
    System.exit(0);
    private void jbtSaveActionPerformed(java.awt.event.ActionEvent evt) {                                       
    String prodNameMod, colorMod;
    double unitsInStockMod, unitPriceMod;
    int idNumMod;
    idNumMod = Integer.parseInt(IDNumberField.getText());
    prodNameMod = prodNameField.getText();
    unitsInStockMod = Double.parseDouble(unitsInStockField.getText());
    unitPriceMod = Double.parseDouble(unitPriceField.getText());
    colorMod = colorField.getText();
    if(currentProductIndex == inventory.length) {
    inList.add(new InventoryPlusColor(idNumMod, prodNameMod,
    unitsInStockMod, unitPriceMod, colorMod));
    InventoryPlusColor[] inventory = (InventoryPlusColor[]) inList.toArray
    (new InventoryPlusColor[inList.size()]);
    } else {
    inventory[currentProductIndex].setIDNumber(idNumMod);
    inventory[currentProductIndex].setProdName(prodNameMod);
    inventory[currentProductIndex].setUnitsInStock(unitsInStockMod);
    inventory[currentProductIndex].setUnitPrice(unitPriceMod);
    inventory[currentProductIndex].setColor(colorMod);
    displayProduct(inventory[currentProductIndex]);
    private static void writeInventory(InventoryPlusColor i,
    DataOutputStream out) {
    try {
    out.writeInt(i.getIDNumber());
    out.writeUTF(i.getProdName());
    out.writeDouble(i.getUnitsInStock());
    out.writeDouble(i.getUnitPrice());
    out.writeUTF(i.getColor());
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Exception writing data",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } //end writeInventory()
    private static DataOutputStream openOutputStream(String name) {
    DataOutputStream out = null;
    try {
    File file = new File(name);
    out =
    new DataOutputStream(
    new BufferedOutputStream(
    new FileOutputStream(file)));
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Error", "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    return out;
    } // end openOutputStream()
    private static void closeFile(DataOutputStream out) {
    try {
    out.close();
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Exception closing file",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } // end closeFile()
    private static DataInputStream getStream(String name) {
    DataInputStream in = null;
    try {
    File file = new File(name);
    in = new DataInputStream(
    new BufferedInputStream(
    new FileInputStream(file)));
    } catch (FileNotFoundException e) {
    JOptionPane.showMessageDialog(null, "The file doesn't exist",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Error creating file",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    return in;
    private static void closeInputFile(DataInputStream in) {
    try {
    in.close();
    } catch (IOException e) {
    JOptionPane.showMessageDialog(null, "I/O Exception closing file",
    "", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    } // end closeInputFile()
    private double entireInventory() {
    // a temporary double variable that the method will return ...
    // after each product's inventory is added to it
    double entireInventory = 0;
    // loop to control number of products
    for (int index = 0; index < inventory.length; index++) {
    // add each inventory to the entire inventory
    entireInventory += inventory[index].setInventoryValue();
    } // end loop to control number of products
    return entireInventory;
    } // end method entireInventory
    private void jbtLastActionPerformed(java.awt.event.ActionEvent evt) {                                       
    currentProductIndex = inventory.length-1; // move to the last product
    // display the information for the last product
    displayProduct(inventory[currentProductIndex]);
    private void jbtPreviousActionPerformed(java.awt.event.ActionEvent evt) {                                           
    if (currentProductIndex != 0) // it's not the first product displayed
    currentProductIndex -- ; // move to the previous product (decrement the current index)
    } else // the first product is displayed
    currentProductIndex = inventory.length-1; // move to the last product
    // after the current product index is set, display the information for that product
    displayProduct(inventory[currentProductIndex]);
    private void jbtNextActionPerformed(java.awt.event.ActionEvent evt) {                                       
    if (currentProductIndex != inventory.length-1) // it's not the last product displayed
    currentProductIndex ++ ; // move to the next product (increment the current index)
    } else // the last product is displayed
    currentProductIndex = 0; // move to the first product
    // after the current product index is set, display the information for that product
    displayProduct(inventory[currentProductIndex]);
    private void jbtFirstActionPerformed(java.awt.event.ActionEvent evt) {                                        
    currentProductIndex = 0;
    // display the information for the first product
    displayProduct(inventory[currentProductIndex]);
    private void colorFieldActionPerformed(java.awt.event.ActionEvent evt) {                                          
    // TODO add your handling code here:
    private void jbtModifyActionPerformed(java.awt.event.ActionEvent evt) {                                         
    prodNameField.setEditable(true);
    prodNameField.setFocusable(true);
    unitsInStockField.setEditable(true);
    unitPriceField.setEditable(true);
    private void jbtAddActionPerformed(java.awt.event.ActionEvent evt) {                                      
    IDNumberField.setText("");
    IDNumberField.setEditable(true);
    prodNameField.setText("");
    prodNameField.setEditable(true);
    colorField.setText("");
    colorField.setEditable(true);
    unitsInStockField.setText("");
    unitsInStockField.setEditable(true);
    unitPriceField.setText("");
    unitPriceField.setEditable(true);
    restockingFeeField.setText("");
    invenValueField.setText("");
    currentProductIndex = inventory.length;
    private void jbtExitActionPerformed(java.awt.event.ActionEvent evt) {                                       
    DataOutputStream out = openOutputStream("inventory.dat");
    for (InventoryPlusColor i : inventory)
    writeInventory(i, out);
    closeFile(out);
    System.exit(0);
    private static InventoryPlusColor readProduct(DataInputStream in) {
    int idNum = 0;
    String prodName = "";
    double inStock = 0.0;
    double pric

    BalusC -- The line that gives me my NullPointerException is when I call the "DisplayProduct()" method. Its a dumb question, but with NetBeans how do I find out which reference could be null? I'm not very familiar with how NetBeans works with finding out how to debug. Any help you can give me would be greatly appreciated.The IDE is com-plete-ly irrelevant. It's all about the source code.
    Do you understand anyway when and why a NullPointerException is been thrown? It is a subclass of RuntimeException and those kind of exceptions are very trival and generally indicate an design/logic/thinking fault in your code.
    SomeObject someObject = null; // The someObject reference is null.
    someObject.doSomething(); // Invoking a reference which is null would throw NPE.

  • How can i read data in pagemaker file (PMD) using Visual Studio C# NET ?

    I have bunch of data in .PMD file (Page Maker Document). Which contains mathematical equations and chemistry formulas, I am a .NET developer, and I am writing code for one of the educational learning system. For that I need to read and store mathematical equations/ chemistry formulas from .PMD file into database then display on the browser page.
    Is it possible to read data from .PMD file using C#.NET, do I need to use any external libraries. How can I import .PMD to MATHML (Mathematical Markup language)?
    Any existing examples for C#.NET?
    Please help me regarding this.

    I can't claim to know much about visual C# Net, but I do know a bit about pagemaker. It really can't handle equations. there are a few work arounds involving things like baseline shifts and multiple text boxes, but generally equations were created in different programs and placed in pagemaker in picture or eps files. Either way the chances of extracting usable data out of pagemaker is very slim.
    Jay

  • QuickTime on Windows Mac PICT File Text display doesn't work

    There is a problem in QuickTime for Windows, which was there with version 6, and still exists in version 7. I have a Macintosh format PICT file, generated in Illustrator, that contains text and graphics. The text is in Arial font of a particular size. Viewing this PICT file on Windows within the QuickTime Player AND the QuickTime PictViewer, the font is scaled far larger than it is in the Mac version, to the point of going way outside a rectangle drawn around the text.
    When this same PICT file is imported into Excel or Word on Windows, the text aligns and displays correctly, and at the correct size.
    I am a software developer, and I have run PICTS through Quicktime programmatically, and there seems to be a real problem with text handling.
    Anyone else seen this? Any ideas?

    Let me also clarify this by saying that the font I am using exists both on Windows and Mac platforms.

  • Applescript:: PICT File Compression doesn't work [?]

    I have tried many options for getting Pict file compression to work via scripting but to no avail. Can anyone confirm if this works in PS CS4?
    PICT file options I am trying to get to work are:  {class:PICT file save options, compression:maximum quality JPEG, embed color profile:false, resolution:thirty two, save alpha channels:false}
    All option **except compression seem to work.. :/
    Example code:
    set newPictFilePath to ((path to desktop folder) & "newPictFile.pct") as string
    tell application "Adobe Photoshop CS4"
    set docRef to current document
    set photoshopSaveFormat to PICT file
    set photoshopSaveOptions to {class:PICT file save options, compression:maximum quality JPEG, embed color profile:false, resolution:thirty two, save alpha channels:false}
    set kSavedDocument to save docRef in file newPictFilePath as photoshopSaveFormat with options photoshopSaveOptions appending no extension with copying
    end tell

    Hello,
    I did not have any problems with the script you posted, but I ran into issues when my document was not flattened, or was not RGB. After I added that to the script, everything seemed to work.
    I also have a habit of telling a document to save instead telling the app to save a document, but that might just be my quirk.

  • FCP Motion=lose alpha channels in pict files?

    Hi there! I'm a regular FCP and AE user, just starting to dip my toes into Motion...
    I just sent to Motion from FCP a section of my sequence that had logos being animated with accompanying text. I prepped the logos in Pshop and added alpha channels to cut out their backgrounds so they could float on black; saved as .pict with alpha. They read correctly in FCP but when sent to Motion the alpha channels disappeared. If I re-import the original .pict file then the alpha is read correctly but then I have to re-do all my moves, fades etc. which kinda defeats the purpose of sending to Motion (at least on this job). Also the text generators disappeared completely; I know I could re-do in Motion with better results but still, that's annoying.
    Are these just "features" of Motion or am I doing something wrong?
    TIA, JK

    Hey John,
    Maybe Motion is incorrectly guessing the premultiplication of the alpha. Did you look at the media settings for the PICT? Go into the Media tab of the Project View, select the PICT media item, then go into the Media tab of the Inspector. There's a popup there for the premultiplication settings.
    Good luck!

  • Problem exporting as a Pict file in CS5

    I need to export a file in Pict file mode and I know Photoshop CS5 discontinued that format. Does anybody knows what could be a good replacement. I need to import the Pict file in DVD Studio Pro to use as an overlay for a menu. Thank you!!

    Batfilms wrote:
    ...I need to import the Pict file in DVD Studio Pro to use as an overlay for a menu...
    Are you certain of this need? I don't remember ever using PICT in any Final Cut Studio app. PICT is sooo last century.
    There's a long list of available formats:
    http://www.apple.com/finalcutstudio/specs/#dvdstudiopro
    I've always had success with PSD without any live layer effects.

  • Problems with old Pict files

    help, my old pict files are not recognized bij Preview or Quick Time. They are now only Quick-Draw files but can not open them

    That file does not contain any picture that I can see. In Snow Leopard, GraphicConverter (6.7.4) opens the file as an image, but the image is merely 244x88 pixels of blank white space. QuickTime Player 7 also renders the file as white space.
    MacLinkPlus Deluxe (an old conversion application) recognizes the file as a PICT graphic and translates it, but, again, it's just 244x88 pixels of white space.
    At the hex level, 0xED reveals that the file was produced by SoftShell Int'l Ltd. A bit of web-searching leads to the ChemIntosh application presumably used to create the file and the current corporate owner of ChemIntosh/ChemWindow, Bio-Rad, http://www.bio-rad.com/en-us/product/spectroscopy-software/chemwindow-software?p cp_loc=catprod.
    But that file you posted is very small--only 3396 bytes. In fact, it's so small that at first I suspected it to be an alias to a file rather than the file itself. However, GC, QT, and MLPD all open the file as an image, even though that image seems to contain no actual picture. Do you have anything larger to test?

  • Importing Still Frame .pict file comes in slightly squished...

    ...with thin vertical black bars on the sides.
    I "save frame" as a pict file, edit the file in Photoshop without any resizing done to the file, save it into my iPhoto library as a pict file, import the file into iMovie with the Ken Burns effect TURNED OFF, and the frame appears to be slightly squished horizontally with a thin black vertical bar appearing on the right side of the frame.
    This worked just fine in iMovie 3.0 as I ran several tests last year to see if this project of mine was going to work but now in iMovie HD 6.0........AAAARRRGGGHHHHH!!
    And also, somewhat unrelated, why can't iMovie save an exact clean frame when using "create still frame"?
    Any thoughts and help is GREATLY appreciated!

    I don't quite remember what your original goal was but anyway:
    If you want to manipulate a video frame in Photoshop:
    Export the clips as Full Quality DV from iMovie.
    Open the .dv with QT Player and Edit/Copy the desired frame.
    In Photoshop File/New... should propose 720x480 (NTSC). Then Edit/Paste... and manipulate the image. Then flatten the image and Save as TIF.
    Open the .tif with QT Player. Do Edit/Copy. Then do Edit/Paste so many times that you reach the desired duration (2 seconds, for example).
    Then choose File/Export.../Movie to DV stream/DV, NTSC, 16:9.
    Import the .dv to iMovie.
    The colors seemed to pefectly match the original video clip's colors. I didn't touch the default color profiles at all.
    One great benefit of that method is that no scaling is needed so every (unedited) pixel stays the same with no distortion. Of course you can set Photoshop to display the rectangular pixels as sqaure pixel aspect ratio (for 4:3 it is 4320:4739 ~0.9116 and for 16:9 it is (4320:4739)*(4/3) ~1.215).
    Oh, no I remember where I got 875: It is (4320:4739)(4/3)720.

  • 16-bit PICT file and LONG render....

    OK, I read somewhere that the PICT format, for single layer graphics, is the format of choice for FCP. So I have a slideshow of 135 PICT files saved as 16bit/pixel (vs 32bit/pixel). I used an 8-bit uncompressed set up. Again, I read this would yield a higher quality slideshow. Editing consists of motion keyframes and the de-interlace filter. Editing responsiveness was somewhat sluggish. The whole sequence is about about 13 minutes long. I am now in the 8th hour of rendering. I have a dual 2.7 with 4.5 gigs RAM. The primary scrtach disc is a pair of G-Raids, 500GB each, raid stripe (1TB) via OS X. My AM shows FCP using 180% of the processing power and both processors are full green. In other words, everything seems OK. This will be the first time I have used an uncompressed settting and first time using PICTs... but it seems to me that 8 hours + to render 13 minutes is a bit steep. What am I missing?
    Mike

    I'm with Shane - if you're using print resolution pix (i.e. much larger than 720x486, you're paying the price in re-sizing. The best way to get maximum performance out of this kind of situation is to resize your pix outside of FCP so that when they are blown up to the max you will use it is at 100% - pixel for pixel. Plus, I wouldn't de-interlace everything - that's gonna cost you and you'll get a poorer picture quality for it.
    Patrick

  • Viewing .pict files?

    How do I read old .pict files?  I have a lot of old .pict files from Claris CAD exports and nothing seems to read them.

    Hello, concerning the MacDraw files, a commercial applications EazyDraw claims to be able to open them, at least if you choose the retro application :  http://www.eazydraw.com/RetroSupport.htm ( see http://vintagemacmuseum.com/converting-macdraw-files/ ), but I have never test it.
    Note: As I have tried to add some support for MacDraw files in libmwaw, you can also try the small AppleScript mwawOSX on https://sourceforge.net/projects/libmwaw/files/ , i.e. as I have very few MacDraw files to test, I am not sure that all the conversions will be accurate, but as it is free ....

  • Why will CS3 not recognize Pict files?

    Why is it that CS3 Photoshop will not open Pict files, even after
    going into Image Info and saying open all images like this Pict file in CS3.
    . . . . and yet . . . .
    I can open the Tiger OS application PREVIEW and open the same Pict file?
    I can open any Pict file in Preview and convert to jpg, then CS3 seems to
    recognize the image file and open it.
    Why will CS3 not recognize Pict files?
    John R

    TheBlackXacto wrote:
    Yes, in: CS3/Application/Plug-ins/Import/Export/Pict Resource.plugins
    Oy!  
    The Mac Paint.plugin has to be in ./Applications/Adobe Photoshop Cs3/plug-Ins/File Formats/Mac Paint.plugin
    You need to find the Mac Paint.plugin in the Goodies/Optional Plug_ins/File Formats/… then relaunch Photoshop.

  • Importing mac .pict files?

    Hi All,
    I am moving a bunch of old mac .pict files to my vista machine using LR2. At least i'd like to. I see no documentation about .pict files and think I am out of luck.
    Has anyone dealt with this before and is there an elegant or easy solution?
    thanks in advance.

    LR only supports raw files, psd, tiff or jpeg for still images.
    Has anyone dealt with this before and is there an elegant or easy solution?
    Convert them to a more standard format such as tiff. It is trivial to write a little automator action on your mac that will do that in one swoop.

  • PICT file problems

    Hi,
    I recently upgraded to Appleworks 6 from Clarisworks 4. I used to used PICT files from Clarisworks and they'd print crystal clear. Now when I try, they look like a copy of a copy of a copy... The quality is grainy, and all of the text is blurred. I've tried everything I can think of to fix it with no luck. TIFF's give me the same result. I need to use these files, and I need them to be clear.
    Any suggestions?
    Thanks,
    Jeff

    Welcome to Apple Discussions Jeff
    I'm assuming you're using AppleWorks 6.2.9. A number of users have experienced problems printing JPEGs in 6.2.9 & I guess the problem can occur with PICT & TIFF as well. The "fix" is to turn Fractional Character Widths on in Preferences > General > Topic: Text. This is an old trick that hadn't been needed in some time. It apparently has something to do with postscript printing.

  • How well does iWork 06 read old iWork 05 files?

    I am thinking about buying iWork 06. How well does it read your old iWork files? Any problems?
    Thanks

    There are some problems, although minor and solveable, and depending how you've been formatting your work in Pages 1.
    Pages 2 will overwrite any leading or multiple mid-line spaces you may have used as a workaround - e.g., to produce a drop cap (or majuscule) in Pages 1. These have to be replaced with "non-breaking spaces," referred to in the onscreen help on "invisibles" - and listed with the keyboard shortcuts. The shortcut for the "non-breaking space" is Option / Space.
    There are also slight variations in how Pages 2 treats pagination. This is particularly evident if you've used the "baseline adjustment" to produce "leading" i.e., to make adjacent columns or facing pages exactly the same depth. This can need small adjustment after importing, although there is little consistency about it. Some pages will vary; others not.
    There is also a minor and infrequent bug in Pages 2's justification, which I have reported to Apple. Just once in a while, it will leave a space inside the right hand margin, instead of justifying all the way to it. With "invisibles" on it is easy to see if this has happened or you just have a double space.
    In short there may be some reworking to do in some documents.
    However it is not the case that importing from Pages 1 to Pages 2 is irretrievable. You can (1) slightly rename your document when saving in Pages 2 - so that the Pages 1 document is not overwritten, or (2) save a Pages 2 document as a Pages 1 document - in which case any new features of Pages 2 that have been used will be lost; but the rest of the document survive.
    I would recommend using method (1) above until you are completely satisfied that your documents are successfully migrated; and only then consider removing Pages 1 from your system.
    Regards.

Maybe you are looking for

  • Unable to download imac version 7.0 or higher

    The hardrive was replaced on my Imac. Was initially unable to log on or do anything. I reinstalled the CD that came with and was then able to reset passwords and get in. I have downloaded available software multiple times and I am still miss many app

  • Cant find icloud on my computer

    hi, i cant find icloud on my macbook pro, the mac is only 10 months old so i think all software etc is upto date. any ideas/help would be much appreciated. thanx kar

  • MOVIES NOT COPYING TO IPOD

    this product is really disappointing me, since this is the third major problem i've had with the video nano... anyway, i have movies in .mp4 format, and they copy to my iTunes library but they don't go onto my iPod. it says "this movie was not copied

  • Frozen when trying to launch a game

    Hi My ipod was playing music, I tried to launch one of the games and the Ipod has been frozen for 12 hours, I have tried to restart however no power, the machine does not respond to itunes, play music or charge. Message reads 'This game cannot be lau

  • Where's my Manual Equalizer?

    Just "upgraded" to 7.4.2 and now can't get my manual Equalizer window to show up. What's up?