Boxlayout question

hey all
i have a jfame that have a panel that have a y-axis boxlayout, in this panel i have another panel that have an x-axis boxlayout, in this panel i added a jlabel and a jtextfield but the problem is that those two components appear in the center of the panel, i tried setalignmentx() but it doesn't work...
how to make the two component with left alignment???
please help
thanks in advance

for all who are interested in a solution, here is the solution that i came up with
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
public class GUI extends JFrame implements ActionListener {
    public GUI() {
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setTitle("DVD rental center");
        setSize(1000, 700);
        setLocation(20, 20);
        initializeMenuBar();
        initializeGUI();
    public void initializeGUI() {
        JTabbedPane tp = new JTabbedPane(JTabbedPane.LEFT);
        getContentPane().add(tp);
        tp.addTab("Rent Fees", new RentFeesGUI());
    public void initializeMenuBar() {
        JMenuBar menuBar = new JMenuBar();
        JMenu fileMenu = new JMenu("File");
        JMenuItem exitItem = new JMenuItem("Exit");
        exitItem.setActionCommand("exit");
        exitItem.addActionListener(this);
        fileMenu.add(exitItem);
        menuBar.add(fileMenu);
        this.setJMenuBar(menuBar);
    public static void main(String[] args) {
        GUI g = new GUI();
        g.setVisible(true);
     * Invoked when an action occurs.
    public void actionPerformed(ActionEvent e) {
        if (e.getActionCommand().equalsIgnoreCase("exit"))
            System.exit(0);
class RentFeesGUI extends JPanel implements WindowListener {
    private JLabel rentFee = new JLabel("Rent Fees ");
    private JLabel lateFee = new JLabel("Late Fees ");
    private JTextField rentFeeField = new JTextField(10);
    private JTextField lateFeeField = new JTextField(10);
    private final int HORIZONTAL_SPACING = 600;
    private final int VERTICAL_SPACING = 700;
    private final int SMALL_VERICAL_SPACING = 10;
    private final int FONT_SIZE = 20;
    private Font f = new Font("Times New Roman", Font.BOLD, FONT_SIZE);
    public RentFeesGUI() {
        setupComponents();
        setupFonts();
        initializeGUI();
    public void setupFonts() {
        rentFee.setFont(f);
        lateFee.setFont(f);
        rentFeeField.setFont(f);
        lateFeeField.setFont(f);
    public void setupComponents() {
        rentFeeField.setBorder(BorderFactory.createLoweredBevelBorder());
        lateFeeField.setBorder(BorderFactory.createLoweredBevelBorder());
    public void initializeGUI() {
        rentFeeField.setEditable(false);
        lateFeeField.setEditable(false);
        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        Box b1 = new Box(BoxLayout.LINE_AXIS);
        b1.add(rentFee);
        b1.add(rentFeeField);
        b1.add(Box.createHorizontalStrut(HORIZONTAL_SPACING));
        add(b1);
        add(Box.createVerticalStrut(SMALL_VERICAL_SPACING));
        Box b2 = new Box(BoxLayout.LINE_AXIS);
        b2.add(lateFee);
        b2.add(lateFeeField);
        b2.add(Box.createHorizontalStrut(HORIZONTAL_SPACING));
        add(b2);
        add(Box.createVerticalStrut(VERTICAL_SPACING));
    public void setupButtons() {
        //To change body of implemented methods use File | Settings | File Templates.
    public void resetFields() {
        //To change body of implemented methods use File | Settings | File Templates.
     * Invoked the first time a window is made visible.
    public void windowOpened(WindowEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
     * Invoked when the user attempts to close the window
     * from the window's system menu.
    public void windowClosing(WindowEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
     * Invoked when a window has been closed as the result
     * of calling dispose on the window.
    public void windowClosed(WindowEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
     * Invoked when a window is changed from a normal to a
     * minimized state. For many platforms, a minimized window
     * is displayed as the icon specified in the window's
     * iconImage property.
     * @see java.awt.Frame#setIconImage
    public void windowIconified(WindowEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
     * Invoked when a window is changed from a minimized
     * to a normal state.
    public void windowDeiconified(WindowEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
     * Invoked when the Window is set to be the active Window. Only a Frame or
     * a Dialog can be the active Window. The native windowing system may
     * denote the active Window or its children with special decorations, such
     * as a highlighted title bar. The active Window is always either the
     * focused Window, or the first Frame or Dialog that is an owner of the
     * focused Window.
    public void windowActivated(WindowEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
     * Invoked when a Window is no longer the active Window. Only a Frame or a
     * Dialog can be the active Window. The native windowing system may denote
     * the active Window or its children with special decorations, such as a
     * highlighted title bar. The active Window is always either the focused
     * Window, or the first Frame or Dialog that is an owner of the focused
     * Window.
    public void windowDeactivated(WindowEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
}

Similar Messages

  • TextSamplerDemo.java question

    I took the TextSamplerDemo from http://java.sun.com/docs/books/tutorial/uiswing/components/text.html and stripped it down to the one thing I have a question about. Given the code below, how do I implement the toolbar button to make selected text turn bold? I've been beating my head againt this one for a couple of days now and getting nowhere.
    Any help would be deeply appeciated.
    --gary
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*; //for layout managers and more
    import java.awt.event.*; //for action events
    public class TextSamplerDemo extends JPanel
    implements ActionListener {
    private String newline = "\n";
    protected static final String textFieldString = "JTextField";
    public TextSamplerDemo() {
    setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
    JToolBar toolBar = buildToolbar();
    add(toolBar);
    //Create a text pane.
    JTextPane textPane = createTextPane();
    JScrollPane paneScrollPane = new JScrollPane(textPane);
    paneScrollPane.setVerticalScrollBarPolicy(
    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    paneScrollPane.setPreferredSize(new Dimension(250, 155));
    paneScrollPane.setMinimumSize(new Dimension(10, 10));
    add(textPane);
    public void actionPerformed(ActionEvent e) {
    private JTextPane createTextPane() {
    String[] initString =
    { "This is an editable JTextPane, ",            //regular
    "another ", //italic
    "styled ", //bold
    "text ", //small
    "component, " + newline, //large
    "which supports embedded components..." + newline,//regular
    newline + "JTextPane is a subclass of JEditorPane that " + newline +
    "uses a StyledEditorKit and StyledDocument, and provides " + newline +
    "cover methods for interacting with those objects."
    String[] initStyles =
    { "regular", "italic", "bold", "small", "large",
    "regular", "regular"
    JTextPane textPane = new JTextPane();
    StyledDocument doc = textPane.getStyledDocument();
    addStylesToDocument(doc);
    try {
    for (int i=0; i < initString.length; i++) {
    doc.insertString(doc.getLength(), initString,
    doc.getStyle(initStyles[i]));
    } catch (BadLocationException ble) {
    System.err.println("Couldn't insert initial text into text pane.");
    return textPane;
    protected void addStylesToDocument(StyledDocument doc) {
    //Initialize some styles.
    Style def = StyleContext.getDefaultStyleContext().
    getStyle(StyleContext.DEFAULT_STYLE);
    Style regular = doc.addStyle("regular", def);
    StyleConstants.setFontFamily(def, "SansSerif");
    Style s = doc.addStyle("italic", regular);
    StyleConstants.setItalic(s, true);
    s = doc.addStyle("bold", regular);
    StyleConstants.setBold(s, true);
    s = doc.addStyle("small", regular);
    StyleConstants.setFontSize(s, 10);
    s = doc.addStyle("large", regular);
    StyleConstants.setFontSize(s, 16);
    private JToolBar buildToolbar() {
    JToolBar toolBar = new JToolBar();
    toolBar.setRollover( true );
    toolBar.setFloatable( false );
    JButton boldButton = new JButton("Bold");
    boldButton.setToolTipText( "Set selected text to bold" );
    boldButton.addActionListener( new ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    // code here to make selected text bold
    toolBar.add( boldButton );
    return toolBar;
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("TextSamplerDemo");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    JComponent newContentPane = new TextSamplerDemo();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();

    try this, but im'not sure.
    StyleContext styleContext = StyleContext.getDefaultStyleContext();
    Style def = styleContext.getStyle(StyleContext.DEFAULT_STYLE);
    Style bold = styledDocument.addStyle("bold", def);
    StyleConstants.setBold(bold, true);into the listener of your component insert this:
    int start = getSelectionStart();
    int len = getSelectionEnd() - start;
    styledDocument.setCharacterAttributes(start, len, bold, true);by gino

  • Align left panels inside BoxLayOut / Center a frame center screen

    Hi,
    I've googled for a good while now so now I'm posting the question I have not found a satisfactory answer. It may be that I've been searching by the wrong terms, because it's an easy thing in concept. This is a JSwing question and all terms below apply to that.
    I have a method which takes a container that has a BoxLayout manager. Each item I add is a new row, which is good. The bad thing is that each item is centered aligned. I'm adding a label and textfield into a panel which I then add to the container. I have tried .setAlignmentX to the label, textfield, panel, and all combination pertaining. I can not for the life of me do it. Please see below for pertinent code.
    public void addComponentsToPane(Container pane) {
    pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
    JPanel user = new JPanel();
    JLabel userL = new JLabel("Username: ");
    JTextField userT = new JTextField(20);
    user.add(userL);
    user.add(userT);
    user.setAlignmentX(Component.LEFT_ALIGNMENT);
    I hate to put two questions in one thread, but I'm stuck and it's been a long weekend. How come frame.setLocationRelativeTo(null); doesn't set the frame to the center of the window. It's slightly off center; too far to the right and down.
    Thanks in advance for any help given by the community. I appreciate it and hope I haven't broken any guidelines for the forum.

    Go through the [url http://download.oracle.com/javase/tutorial/uiswing/layout/box.html]tutorial for BoxLayout where you will find working code samples. After that, if you still have a problem, post a [url http://mindprod.com/jgloss/sscce.html]SSCCE (Short, Self Contained, Compilable and Executable) that members can copy and run to see where you've slipped up.
    db

  • Layout centering issue with BoxLayout

    The code is two BoxLayout panels placed in a frame with FlowLayout.
    I cannot get the second panel's label to be centered. I purposely made both panels identical. Any ideas what I am missing?
    import java.awt.*;
    import javax.swing.*;
    public class MVCtest extends JFrame {
         public MVCtest() {
              getContentPane().setLayout(new FlowLayout());
              JTextField controller = new JTextField(10);          
              JLabel controllerLabel = new JLabel("Controller");
              JPanel controllerPanel = new JPanel();
              controllerPanel.setLayout(new BoxLayout(controllerPanel, BoxLayout.Y_AXIS));
              controllerPanel.setBorder(BorderFactory.createEtchedBorder());
              controllerPanel.add(controllerLabel);
              controllerLabel.setAlignmentX(controllerLabel.CENTER_ALIGNMENT);
              controllerPanel.add(Box.createVerticalStrut(10));
              controllerPanel.add(controller);
              JTextField view = new JTextField(10);     
              JLabel viewLabel = new JLabel("Controller");
              JPanel viewPanel = new JPanel();
              viewPanel.setLayout(new BoxLayout(viewPanel, BoxLayout.Y_AXIS));
              viewPanel.setBorder(BorderFactory.createEtchedBorder());
              viewPanel.add(viewLabel);
              viewPanel.setAlignmentX(viewLabel.CENTER_ALIGNMENT);
              viewPanel.add(Box.createVerticalStrut(10));
              viewPanel.add(view);
              getContentPane().add(controllerPanel);
              getContentPane().add(viewPanel);
         public static void main(String[] args) {
              JFrame.setDefaultLookAndFeelDecorated(true);
              MVCtest frame = new MVCtest();
              frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
              frame.setSize(400,400);
              frame.setVisible(true);
    }Thanks,
    Lance

    Problem solved, yet not understood.
    I posted the question and now eliminated the issue.
    I simply cut and pasted the first panel code over the second panel's code. I then renamed the variables and the problem went away.
    I don't know why because I didn't see any problem with the first code.
    Thanks to any and all who committed brain power to this problem.
    Lance

  • JTree sizing question...

    Hello:
    I have a JTree for which each cell contains a button. I have written a renderer that renders the button, and I realize that I have to do some special stuff to capture a click on the button. My question is unrelated to all of that.
    The problem is that over time, the labels on my buttons change (and may become longer (wider)), but the tree size does not change. In fact, when I update the button label and the tree is re-rendered the rendering of the button gets "chopped off". I've put the tree in a scroll pane, but this doesn't help - the right side of some of the buttons get cut off to the original tree size. I've tried lots of different variations on setPreferredSize, calling repaint, etc, and am not having any luck. I've put together a demonstration of this behavior in a smallish application that I'm posting here, where I create a 2 node tree with buttons that read "Hi", then I change the button labels to "Goodbye" and re-render. You'll see that the button's are cut off about halfway through the button.
    In case its important - I'm running java version 1.5.0_07 on a 32-bit Linux box.
    Any help would be greatly appreciated. Thanks in advance!
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.*;
    public class JTreeQuestion
      public static void main(String [] args)
        JTreeFrame f = new JTreeFrame();
        f.pack();
        f.setLocation(30, 30);
        //Draws buttons with "Hi" (short string)
        f.setVisible(true);
        ButtonNode.updateString("Goodbye");
        //Draws buttons with longer string, buttons get "cut off"
        f.repaint();
    class JTreeFrame extends JFrame
      JTree tree;
      JScrollPane treeView;
      public JTreeFrame()
        super("My Tree");
        DefaultMutableTreeNode root;
        root = new DefaultMutableTreeNode(new ButtonNode());
        root.add(new DefaultMutableTreeNode(new ButtonNode()));
        tree = new JTree(root);
        tree.setCellRenderer(new ButtonNodeRenderer());
        treeView = new JScrollPane(tree);
        add(treeView);
    class ButtonNode
      public static String str = "Hi";
      public static void updateString(String inStr)
      { str = inStr; }
      String getStr()
      { return str; }
    class ButtonNodeRenderer extends DefaultTreeCellRenderer
      public Component getTreeCellRendererComponent(JTree tree,
                              Object value, boolean sel, boolean expanded,
                              boolean leaf, int row, boolean hasFocus)
        Box theBox = new Box(BoxLayout.X_AXIS);
        super.getTreeCellRendererComponent(tree, value, sel, expanded,
                                           leaf, row, hasFocus);
        DefaultMutableTreeNode jtreeNode = (DefaultMutableTreeNode)value;
        theBox.add(new JButton(((ButtonNode)jtreeNode.getUserObject()).getStr()));
        return (theBox);
    }

    For those who are interested. The DefaultTreeModel has a method named nodeChanged() that tells the tree model that a specific node has changed, and the model re-interprets the cell causing its sizse to change as necessary, so that the full button is rendered now.
    Basically what I did was instead of calling repain, I call a method that I wrote that loops through all the tree nodes, indicates they have changed, then repaint's, and it all works out. My trees are relatively small, so this is fine, but if others face the same problem, you'll probably want to selectively indicate which nodes have changed so the tree model doesn't have to do more work than necessary.

  • Right margin ?  and JSrollBar question

    To keep my components from being too close to the edge on the left hand side of my app, i use:
    container.add(Box.createRigidArea(new Dimension(5,0)));
    My question is how i can acheive the same 5 pixel wide margin on the right handside of my container. If i do 'newDimension(5, (getWidth() - 5))' will this be respected as the component is enlarged or is there a better way ?
    Secondly i have 2 JScrollBars (each with a JTable) in a splitPane, the horizontal scroll bar outline always shows but never with the blue bar part. Here is the relevant code:
    JScrollPane s1 = new JScrollPane(getTableA());
    JScrollPane s2 = new JScrollPane(getTableB());
        JSplitPane spl = new JSplitPane(JSplitPane.VERTICAL_SPLIT,s1, s2);
        s1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        s1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
        s2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);     s2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); 
    void set(Container pane){
    pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
    //returns the split pane above
    pane.add(getSpl());
    }Thanks for the help

    Regarding the margin, it appears i can't apply this to a container. Is there another way ?Borders are only for Swing components so you would at the Border to the panel you added to the content pane.
    if the table doesn't resize to the size of the application it looks very bad indeedIf the table resizes to the size of the application then there is no need for horizontal scrollbars.

  • JFileChooser question

    Hey Guys,
    My First post on the sun forums, so a big hello to you guys. I have a question in relation to best practice in querying something in one user interface, of another user interface. Suppose i have a class that consists on a TextField,JButton, and a JButton which opens a JFileChooser; i would like to return the value of the JTextField from the second GUI class to a calling gui class (gui1), once the OK button has been pressed. The second gui class consists of the following.
    package UserInterface;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import javax.swing.BoxLayout;
    import javax.swing.JButton;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    Class that allows for a local file to be chosen
    @author pthug
    public class ImageChooser extends JFrame {
    private JButton okButton;
    private JButton chooseFileButton;
    private JTextField locationTextField;
    private JPanel mainPanel;
    private JPanel locationPanel;
    private JFileChooser fc;
    private String address;
    //default constructor
    public ImageChooser() {
    super("Image Chooser");
    //set default size
    setSize(new Dimension(450,250));
    setResizable(false);
    //create components
    initComponents();
    //set layout - top to bottom
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS));
    locationPanel.setLayout(new FlowLayout());
    //add components to frame
    addComponents();
    //pak components
    pack();
    //centre frame on screen
    setLocationRelativeTo(null);
    //close frame as default operation
    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    //add action listeners to components
    createActionListeners();
    //show frame
    setVisible(true);
    //*adds all components*
    *private void addComponents() {*
    *locationPanel.add(locationTextField);*
    *locationPanel.add(chooseFileButton);*
    *mainPanel.add(locationPanel);*
    *mainPanel.add(okButton);*
    *this.add(mainPanel);*
    *//*create the components for interface
    private void initComponents() {
    okButton = new JButton("OK");
    chooseFileButton = new JButton("...");
    locationTextField = new JTextField(50);
    mainPanel = new JPanel();
    locationPanel = new JPanel();
    fc = new JFileChooser();
    address = new String("");
    //create action listeners for components
    private void createActionListeners() {
    //open File Choose Dialog
    chooseFileButton.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
    // TODO Auto-generated method stub
    if (e.getSource() == chooseFileButton) {
    int returnVal = fc.showOpenDialog(ImageChooser.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    locationTextField.setText(file.getPath());
    } else {
    System.out.println("Open command cancelled by user." + "\n");
    //ok button action listener
    okButton.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
    address = locationTextField.getText();
    //some more methods that determine if a web address has been typed in the JTextField or whether a
    //local file has been chosen using the JFileChooser which has not been written yet
    //@param args
    public static void main(String[] args) {
    ImageChooser co = new ImageChooser();
    }and a call the class from a the first gui class as such
    GUI 1
    addImageItem.addActionListener(new ActionListener() {
                 @Override
                      public void actionPerformed(ActionEvent arg0) {
                           imageChooser = new ImageChooser();
    ... remaining source of class remove as its not necessary to the questionhow can i query when the ok button has been pressed on the second gui class, so that the first gui knows when to take the value from the JTextField. Would i just put a method in the second gui which is a boolean that holds true or false whether its ok to take the value from the JTextField and query it like such...
    //                       while(imageChooser.isStillOpen()) {
    //                       }Hope that makes sense.
    Regards,
    KevJ
    Edited by: KevJ on 10-Nov-2009 17:05

    Thank you for your reply bharath.bravo, that has solved my question. Which i did as such, i provided a method in the second GUI class to enable me to add an ActionListener to the OK button. As such
          * this method allows other classes to add their action listeners to
          * the OK Button
          * @param e Action Listener from another class
         public void addActionToOKButton(ActionListener e) {
              okButton.addActionListener(e);
         }     I then added a accessor method, to get the value from the textfield; which i've implemented it as such:
    imageChooser.addActionToOKButton(new ActionListener() {
                                  @Override
                                  public void actionPerformed(ActionEvent arg0) {
                                                                                                                    //use imageChooser accessor method to get the value from the text field
                                       imageLocation = imageChooser.getLocationTextField();
                                                                                                                    //DEBUG statement
                                       System.out.println("gui one recieved: " + imageLocation);
                                                                                                                    //get rid of imageChooser window
                                       imageChooser.dispose();
                                  }For the sake of clarity, in your first suggestion. You mentioned that i could implement the WindowListener Interface in the first gui, and add it as a Listener to the second gui. Would i do that like this, and what would be a prefferable way of doing this out of the two methods you suggested.
    public class GUI extends JFrame implements WindowListener
         @Override
         public void windowClosed(WindowEvent arg0) {
              // TODO Auto-generated method stub
              //get value of jTextField using its public accessor method          
    add window listener to second gui, from the first GUI
    imageChooser.addWindowListener(this);Regards,
    KevinJ
    Edited by: KevJ on 11-Nov-2009 14:38

  • BoxLayout not respecting maximumSize?

    Hi,
    When the preferred width of a JPanel is long enough but its maximum width is restricted using setMaximumSize it seems that BoxLayout does not respect the maximum width.
    If the preferred size is also set then the max width is respected, but then some of the text is not displayed despite the scrollbar...
    Anyone has any explanation for this or is this expected?
    An example is below where the max width of labelPanel (105) is not respected:
    static String value = "Part One of the Essential Information Record (Questions 1-22) provides baseline information for ggggg in an ggggggggg. All these questions MUST be answered before any uuuuu/lllll person can be left in a placement. The information should be given to ggggg with the ggggggggg Agreement. Wherever possible, Part Two (Questions 22-63) should be completed BEFORE the person is looked after. In the case of an ddddddddd admission it should be completed AS SOON AS POSSIBLE thereafter. Both parts of the Essential Information Record should be updated before each review, on a supplementary sheet if necessary. Copies should be sent to residential people and ggggg. A further copy should be kept on the uuuuu/lllll person's file.";
    Label label = new JLabel("<html>" + value + "</html>");
    label.setBorder(BorderFactory.createLineBorder(new Color(255, 0, 0)));
    JPanel labelPanel = createVBox();
    labelPanel.add(label);
    labelPanel.setAlignmentY(Component.TOP_ALIGNMENT);
    labelPanel.setMaximumSize(new Dimension(105, 20000000));
    labelPanel.setBorder(BorderFactory.createLineBorder(new olor(255, 0, 0)));
    JPanel hbox3 = createHBox();
    JPanel vb3 = createVBox();
    vb3.setPreferredSize(new Dimension(160, 100));
    vb3.setMaximumSize(new Dimension(160, 100));
    vb3.setBorder(BorderFactory.createLineBorder(new Color(255, 0, 0)));
    vb3.setAlignmentY(Component.TOP_ALIGNMENT);
    hbox3.add(labelPanel);
    hbox3.add(vb3);
    JPanel b1 = createVBox();
    b1.add(new ScrollPane(hbox3));
    JFrame frame = new JFrame("");
    frame.setContentPane(b1);
    where
    private static JPanel createVBox() {
    JPanel jp = new JPanel();
    jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS));
    return jp;
    private static JPanel createHBox() {
    JPanel jp = new JPanel();
    jp.setLayout(new BoxLayout(jp, BoxLayout.X_AXIS));
    return jp;

    BoxLayout assumes that a component's minimum size is smaller than the component's preferred size and that the preferred size is smaller that the maximum size. The first thing BoxLayout checks is whether the preferred size will fit. If not, the BoxLayout will make the component smaller than the preferred size, but no smaller than the minimum size. There is no reason to check the maximum size if the preferred size is already too big and the assumption holds true. Setting the maximum size to be smaller than the preferred size is an error which causes unexpected behavior. Just make sure the min <= pref <= max and everything will work as it is supposed to.

  • BoxLayout allignment

    I would like the JLabel "addedSectionLabel" to be left aligned however it is always center alligned, any ideas on how to achive this?
    JPanel topLeftPanel = new JPanel();
    topLeftPanel.setLayout(new BoxLayout(topLeftPanel, BoxLayout.PAGE_AXIS));
    JLabel addedSectionLabel = new JLabel("Added Sections:");
    addedSectionLabel.setAlignmentX(JLabel.LEFT_ALIGNMENT);
    topLeftPanel.add(addedSectionLabel);Thanks in advance
    Calyspo

    camikr I really wish you would stop flaming me, you seem to be suggesting that I never post an SSCCE, which I do. I didnt post one this time as it is a very simple question and I thought someone would be able to answer it without
    anyway here is a SSCCE:
    import java.awt.Dimension;
    import javax.swing.*;
    public class Alignment {
        private JFrame frame;
        private JList list;
        public void createGui() {
            list = new JList();
            list.setLayoutOrientation(JList.VERTICAL);
            JScrollPane listScroller = new JScrollPane(list);
            listScroller.setPreferredSize(new Dimension(120, 130));
            JPanel topLeftPanel = new JPanel();
            topLeftPanel.setLayout(new BoxLayout(topLeftPanel, BoxLayout.PAGE_AXIS));
            JLabel addedSectionLabel = new JLabel("Added Sections:");
            addedSectionLabel.setAlignmentX(JComponent.LEFT_ALIGNMENT);
            topLeftPanel.add(addedSectionLabel);
            topLeftPanel.add(Box.createGlue());
            topLeftPanel.add(listScroller);
            String[] sectionTypes = {"CHS", "RHS", "SHS"};
            JComboBox sectionTypesComboBox = new JComboBox(sectionTypes);
            topLeftPanel.add(sectionTypesComboBox);
            frame = new JFrame("Section Properties");
            frame.add(topLeftPanel);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            new Alignment().createGui();
    }

  • JRadioButton Question

    Hi,
    I have the following code
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ShowCardLayout extends JApplet implements ActionListener
         private CardLayout cardLayout = new CardLayout(20, 10);
         private JPanel cardPanel = new JPanel(cardLayout);
         JButton previous, next;
         public ShowCardLayout()
              cardPanel.setBorder(new javax.swing.border.LineBorder(Color.black));
              for(int i = 1; i <= 8; i++)
                   JPanel subPanel = new JPanel(new BorderLayout());
                   JLabel label = new JLabel("Question #" + i);
                   JPanel buttonPanel = new JPanel();
                   JRadioButton button1 = new JRadioButton("Excellent");
                   JRadioButton button2 = new JRadioButton("Good");
                   JRadioButton button3 = new JRadioButton("Fair");
                   JRadioButton button4 = new JRadioButton("Poor");
                   ButtonGroup answers = new ButtonGroup();
                   buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS ));
                   buttonPanel.add(button1);
                   buttonPanel.add(button2);
                   buttonPanel.add(button3);
                   buttonPanel.add(button4);
                   subPanel.add(label, BorderLayout.NORTH);
                   subPanel.add(buttonPanel, BorderLayout.WEST);
                   cardPanel.add(subPanel, String.valueOf(i));
              JPanel p = new JPanel();
              p.add(previous = new JButton("Previous"));
              p.add(next = new JButton("Next"));
              getContentPane().add(cardPanel, BorderLayout.CENTER);
              getContentPane().add(p, BorderLayout.SOUTH);
              previous.addActionListener(this);
              next.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              String actionCommand = e.getActionCommand();
              if(e.getSource() instanceof JButton)
                   if("Previous".equals(actionCommand))
                        cardLayout.previous(cardPanel);
                   else if("Next".equals(actionCommand))
                        cardLayout.next(cardPanel);
         public static void main(String[] args)
              ShowCardLayout applet = new ShowCardLayout();
              JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(3);
              frame.setTitle("ShowCardLayout");
              frame.getContentPane().add(applet, BorderLayout.CENTER);
              applet.init();
              applet.start();
              frame.setSize(570, 220);
              frame.setVisible(true);
    }How can I capture button selection from each question?

    a simple demo
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      final int MAX_PANELS = 5;
      CardLayout cl = new CardLayout();
      JPanel clPanel = new JPanel(cl);
      int currentPanel = 0;
      public Testing()
        setSize(300,200);
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        for(int x = 0; x < MAX_PANELS; x++)
          JPanel p = new JPanel();
          p.add(new JLabel("Panel "+ x));
          clPanel.add(""+x,p);
        final JButton btnPrev = new JButton("Previous");
        final JButton btnNext = new JButton("Next");
        JPanel p = new JPanel(new GridLayout(1,2,25,0));
        p.add(btnPrev);
        p.add(btnNext);
        JPanel p1 = new JPanel();
        p1.add(p);
        getContentPane().add(clPanel,BorderLayout.CENTER);
        getContentPane().add(p1,BorderLayout.SOUTH);
        btnPrev.setEnabled(false);
        btnPrev.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            cl.previous(clPanel);
            currentPanel--;
            btnNext.setEnabled(true);
            if(currentPanel == 0) btnPrev.setEnabled(false);}});
        btnNext.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            cl.next(clPanel);
            currentPanel++;
            btnPrev.setEnabled(true);
            if(currentPanel == MAX_PANELS-1) btnNext.setEnabled(false);}});
      public static void main(String[] args){new Testing().setVisible(true);}
    }

  • JList question, pls help!

    Hi friends,
    I am trying to creat a table with JList in a JPanel, the table has a form like:
    1 a b c d
    2 e f g h
    3 i j k l
    As much as i know, JList represent here rows which means that a complete row e.g. "1 a d c d" is a cell of this JList. But how can I display each cell when it is not a single Object but a Vector (here "1 a b c d")?
    This is part of my code, and thanks for any suggestions!
    class MyCellRenderer extends javax.swing.JPanel
    implements javax.swing.ListCellRenderer
    javax.swing.JLabel[] elementsLine;
    // This is the only method defined by ListCellRenderer. We just
    // reconfigure the Jlabel each time we're called.
    public MyCellRenderer()
    setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.X_AXIS));
    setPreferredSize(new java.awt.Dimension(40, 19));
    setMinimumSize(new java.awt.Dimension(40, 19));
    setMaximumSize(new java.awt.Dimension(32767, 19));
         setBackground(combinedList.getBackground());
    // foreground is set for each JLabel, see below
    elementsLine = new javax.swing.JLabel[numOfElements];
    for(int i = 0; i < numOfElements; ++i) {
    elementsLine[i] = new javax.swing.JLabel();
    elementsLine.setPreferredSize(new java.awt.Dimension(40, 19));
    elementsLine[i].setMaximumSize(new java.awt.Dimension(32767, 19));
    elementsLine[i].setMinimumSize(new java.awt.Dimension(40, 19));
    elementsLine[i].setFont(combinedList.getFont());
    add(elementsLine[i]);
    public java.awt.Component getListCellRendererComponent(
    javax.swing.JList list,
    Object value, // value to display
    int index, // cell index
    boolean isSelected, // is the cell selected
    boolean cellHasFocus) // the list and the cell have the focus
    /*PROBLEM!!! because here value is a unique "1" in stead of "1 a b c d" */
    java.lang.Object[] sa = (java.lang.Object[])value;
    for(int i = 0; i < elementsLine.length; ++i) {
    elementsLine[i].setText(((java.lang.String)sa[i]));

    First the obvious question - can't you use a JTable?
    Next - to do what you want with a JList you need to create your own list cell renderer. If you look at the Javadoc for JList, there's some example code for a renderer there (that one adds an icon to list elements, but you'll get the idea...).
    For your particular case, you could make the renderer return a JPanel with an X-axis BoxLayout (or it could even return a Box object), into which it has put the elements of your vector.

  • Flowlayout question

    hi everyone...i have a panel that have a flow layout and a scroll pane attached to it and i also have a button that when pressed, a component is added to the panel...my problem is that when i press the button, the components are added fine but when there is no more place on the line, the components are not placed on the second line even though i have a scroll pane and a flow layout....
    please help
    here are the three classes needed to show the problem
    import javax.swing.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import java.io.IOException;
    public class GUI extends JFrame implements ActionListener {
        public GUI() {
            initializeGUI();
        public void initializeGUI() {
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setResizable(true);
            setTitle("DVD");
            setSize(1000, 700);
            setLocation(20, 20);
            JTabbedPane tp = new JTabbedPane(JTabbedPane.LEFT);
            getContentPane().add(tp);
            tp.addTab("Rent Page", new MultipleRentGUI());
        public static void main(String[] args) {
            new GUI().setVisible(true);
         * Invoked when an action occurs.
        public void actionPerformed(ActionEvent e) {
        ActionListener BackupListener = new ActionListener() {
    import javax.swing.*;
    import javax.swing.border.Border;
    import javax.swing.border.TitledBorder;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.Calendar;
    import java.util.GregorianCalendar;
    public class MultipleRentGUI extends JPanel implements ActionListener, GUIConstants {
        private JRadioButton id = new JRadioButton("Customer ID", true);
        private JRadioButton name = new JRadioButton("Customer name");
        private JLabel label = new JLabel("Customer ID: ");
        private JTextField cust = new JTextField(10);
        private JButton rent = new JButton("Rent");
        private JButton reset = new JButton("Reset");
        private JButton add = new JButton("Add");
        private JButton remove = new JButton("Remove");
        private JPanel bPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        private JPanel lPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        private JPanel b2Panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        private JPanel tPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        private JPanel b3Panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
        private JPanel nPanel = new JPanel();
        private ArrayList<MultipleTitleRentGUI> titles = new ArrayList<MultipleTitleRentGUI>();
        private int count = 0;
        private Calendar c = Calendar.getInstance();
        private final int FONT_SIZE = 15;
        private Font f = new Font("Times New Roman", Font.BOLD, FONT_SIZE);
        private Font borderFont = new Font("Times New Roman", Font.BOLD, FONT_SIZE + 5);
        public MultipleRentGUI() {
            setupComponents();
            setupFonts();
            setupButtons();
            initializeGUI();
        public void setupFonts() {
            id.setFont(f);
            name.setFont(f);
            rent.setFont(f);
            reset.setFont(f);
            cust.setFont(f);
        public void setupComponents() {
            Border b = BorderFactory.createLoweredBevelBorder();
            this.setBorder(BorderFactory.createTitledBorder(b
                    , "Multiple Rent Page"
                    , TitledBorder.DEFAULT_JUSTIFICATION
                    , TitledBorder.DEFAULT_POSITION
                    , borderFont
                    , Color.blue));
            cust.setBorder(BorderFactory.createLoweredBevelBorder());
            nPanel.setLayout(new BoxLayout(nPanel, BoxLayout.Y_AXIS));
        public void initializeGUI() {
            rent.setEnabled(true);
            reset.setEnabled(false);
            ButtonGroup bg = new ButtonGroup();
            bg.add(id);
            bg.add(name);
            setLayout(new BorderLayout());
            add(nPanel, BorderLayout.NORTH);
            bPanel.add(id);
            bPanel.add(name);
            nPanel.add(bPanel);
            lPanel.add(label);
            lPanel.add(cust);
            nPanel.add(lPanel);
            b2Panel.add(add);
            b2Panel.add(remove);
            nPanel.add(b2Panel);
            JScrollPane sp = new JScrollPane(tPanel
                    , JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED
                    , JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            add(sp, BorderLayout.CENTER);
            b3Panel.add(rent);
            b3Panel.add(reset);
            add(b3Panel, BorderLayout.SOUTH);
        public void setupButtons() {
            rent.addActionListener(this);
            rent.setActionCommand("rent");
            reset.addActionListener(this);
            reset.setActionCommand("reset");
            id.addActionListener(this);
            id.setActionCommand("id");
            name.addActionListener(this);
            name.setActionCommand("name");
            add.addActionListener(this);
            add.setActionCommand("add");
            remove.addActionListener(this);
            remove.setActionCommand("remove");
        public void resetFields() {
            rent.setEnabled(true);
            reset.setEnabled(false);
            id.setSelected(true);
            cust.setText("");
            label.setText("Customer ID: ");
        public Box addComponent(Component c1, Component c2, int spacing) {
            return null;
         * Invoked when an action occurs.
        public void actionPerformed(ActionEvent e) {
            if (e.getActionCommand().equalsIgnoreCase("id")) {
                label.setText("Customer ID: ");
            if (e.getActionCommand().equalsIgnoreCase("name")) {
                label.setText("Customer Name: ");
            if (e.getActionCommand().equalsIgnoreCase("reset")) {
                resetFields();
            if (e.getActionCommand().equalsIgnoreCase("add")) {
                titles.add(new MultipleTitleRentGUI());
                tPanel.add(titles.get(count));
                count++;
                revalidate();
            if (e.getActionCommand().equalsIgnoreCase("remove")) {
                if (count == 0) {
                    return;
                } else {
                    tPanel.remove(titles.get(count - 1));
                    titles.remove(count - 1);
                    count--;
                    tPanel.revalidate();
                    tPanel.repaint();
            if (e.getActionCommand().equalsIgnoreCase("rent")) {
    import javax.swing.*;
    import javax.swing.border.Border;
    import javax.swing.border.TitledBorder;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.sql.*;
    public class MultipleTitleRentGUI extends JPanel implements ActionListener {
        private JLabel title = new JLabel("Title Barcode: ");
        private JTextField barcode = new JTextField(5);
        private JRadioButton reg = new JRadioButton("Regular price", true);
        private JRadioButton half = new JRadioButton("Half price");
        private JRadioButton free = new JRadioButton("Free of Charge");
        private int fee = getRentFee();
        private JPanel text = new JPanel(new FlowLayout(FlowLayout.LEFT));
        private JPanel buttons = new JPanel();
        private final int FONT_SIZE = 15;
        private Font f = new Font("Times New Roman", Font.BOLD, FONT_SIZE);
        private Font borderFont = new Font("Times New Roman", Font.BOLD, FONT_SIZE + 5);
        public MultipleTitleRentGUI() {
            setupButtons();
            setupComponents();
            initializeGUI();
        private void initializeGUI() {
            setLayout(new BorderLayout());
            setSize(50, 60);
            ButtonGroup bg = new ButtonGroup();
            bg.add(reg);
            bg.add(half);
            bg.add(free);
            text.add(title);
            text.add(barcode);
            add(text, BorderLayout.NORTH);
            buttons.add(reg);
            buttons.add(half);
            buttons.add(free);
            add(buttons, BorderLayout.CENTER);
        private void setupButtons() {
            reg.setFont(f);
            half.setFont(f);
            free.setFont(f);
            reg.addActionListener(this);
            reg.setActionCommand("regular");
            half.addActionListener(this);
            half.setActionCommand("half");
            free.addActionListener(this);
            free.setActionCommand("free");
        private void setupComponents() {
            Border b = BorderFactory.createLoweredBevelBorder();
            this.setBorder(BorderFactory.createTitledBorder(b
                    , "Title"
                    , TitledBorder.DEFAULT_JUSTIFICATION
                    , TitledBorder.DEFAULT_POSITION
                    , borderFont
                    , Color.blue));
            barcode.setBorder(BorderFactory.createLoweredBevelBorder());
            buttons.setLayout(new BoxLayout(buttons, BoxLayout.Y_AXIS));
        public String getBarcode() {
            return barcode.getText();
        public int getFee() {
            return fee;
        private int getRentFee() {
            int cost = 0;
            try {
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                Connection con = DriverManager.getConnection("jdbc:mysql://localhost/dvd", "root", "swordfrogy");
                String sql = "SELECT rent " +
                        "FROM fees";
                Statement stmt = con.createStatement();
                ResultSet rs = stmt.executeQuery(sql);
                while (rs.next()) {
                    cost = rs.getInt("rent");
            } catch (InstantiationException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            } catch (IllegalAccessException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            } catch (ClassNotFoundException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            } catch (SQLException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            return cost;
         * Invoked when an action occurs.
        public void actionPerformed(ActionEvent e) {
            if (e.getActionCommand().equalsIgnoreCase("regular")) {
                fee = getRentFee();
            if (e.getActionCommand().equalsIgnoreCase("half")) {
                fee = getRentFee() / 2;
            if (e.getActionCommand().equalsIgnoreCase("free")) {
                fee = 0;
    }

    Sorry, I've just read the question more carefully :)
    FlowLayout will add the component on a second line if it runs out of space on the first. That's not the cause of the problem.
    However, this container is in a scroll pane. That means it will never run out of space. The layout manager is still adding components to the first line - it's just that they can't be seen because you've suppressed the horizontal scroll bar.
    Note that suppressing the scroll bar does just that: it doesn't restrict the size of the component in the viewport.
    If you want to check that that's what happening, add a println() after your revalidate() call to dump the preferred size of the container - you should see it growing horizontally.
    In order to make the components flow as you intend, the solution I use is an extension of JViewport which uses its own custom layout manaer.
    There may be an easier solution but I didn't find one before I wrote that and I've stuck with it ever since.

  • Display an icon(question,warning,etc.) inside JDialog(like in JOptionPane)

    Hello,
    because JOptionPane can't use a JPasswordField as the input component, I created a JDialog prompting the user for a password. Now I can't figure out how to show that nice look-and-feel style icon inside the dialog (the question mark that is shown when you use messageType=QUESTION_MESSAGE in JOptionPane). Shortly, this is what I have and this is what I want to get... I tried this:
    dlg.getRootPane().setWindowDecorationStyle(JRootPane.QUESTION_DIALOG)But it does nothing. Could you help me, please?
    Thank you
    Ondra

    Still it doesn't answer my question: how to display the LAF icon inside a JDialog.Huh?import javax.swing.*;
    public class OptionPanePassword {
       public static void main(String[] args) {
          SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
                new OptionPanePassword().makeUI();
       public void makeUI() {
          JLabel label =new JLabel("Enter Password: ");
          JPasswordField field = new JPasswordField(15);
          JPanel panel = new JPanel();
          BoxLayout layout = new BoxLayout(panel, BoxLayout.X_AXIS);
          panel.setLayout(layout);
          panel.add(label);
          panel.add(field);
          JOptionPane.showConfirmDialog(null, panel, "",
                JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
    }db

  • Questions on Print Quote report

    Hi,
    I'm fairly new to Oracle Quoting and trying to get familiar with it. I have a few questions and would appreciate if anyone answers them
    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    Thanks and Appreciate your patience
    -PC

    1) We have a requirement to customize the Print Quote report. I searched these forums and found that this report can be defined either as a XML Publisher report or an Oracle Reports report depending on a profile option. Can you please let me know what the name of the profile option is?
    I think I posted it in one of the threads2) When I select the 'Print Quote' option from the Actions drop down in the quoting page and click Submit I get the report printed and see the following URL in my browser.
    http://<host>:<port>/dev60cgi/rwcgi60?PROJ03_APPS+report=/proj3/app/appltop/aso/11.5.0/reports/US/ASOPQTEL.rdf+DESTYPE=CACHE+P_TCK_ID=23731428+P_EXECUTABLE=N+P_SHOW_CHARGES=N+P_SHOW_CATG_TOT=N+P_SHOW_PRICE_ADJ=Y+P_SESSION_ID=c-RAuP8LOvdnv30grRzKqUQs:S+P_SHOW_HDR_ATTACH=N+P_SHOW_LINE_ATTACH=N+P_SHOW_HDR_SALESUPP=N+P_SHOW_LN_SALESUPP=N+TOLERANCE=0+DESFORMAT=RTF+DESNAME=Quote.rtf
    Does it mean that the profile in our case is set to call the rdf since it has reference to ASOPQTEL.rdf in the above url?
    Yes, your understanding is correct.3) When you click on submit button do we have something like this in the jsp code: On click call ASOPQTEL.rdf. Is the report called using a concurrent program? I want to know how the report is getting invoked?
    No, there is no conc program getting called, you can directly call a report in a browser window, Oracle reports server will execute the report and send the HTTP response to the browser.4) If we want to customize the jsp pages can you please let me know the steps involved in making the customizations and testing them.
    This is detailed in many threads.Thanks
    Tapash

  • Satellite P300D-10v - Question about warranty

    HI EVERYBODY
    I have these overheating problems with my laptop Satellite P300D-10v.
    I did everything I could do to fix it without any success..
    I get the latest update of the bios from Toshiba. I cleaned my lap with compressed air first and then disassembled it all and cleaned it better.(it was really clean insight though...)
    BUT unfortunately the problem still exists...
    So i made a research on the internet and I found out that most of Toshiba owners have the same exactly problem with their laptop.
    Well i guess this is a Toshiba bug for many years now.
    Its a really nice lap, cool sound (the best in laptop ever) BUT......
    So I wanted to make a question. As i am still under warranty, can i return this laptop and get my money back or change it with a different one????
    If any body knows PLS let me know.
    chears
    Thanks in advance

    Hi
    I have already found you other threads.
    Regarding the warranty question;
    If there is something wrong with the hardware then the ASP in your country should be able to help you.
    The warranty should cover every reparation or replacement.
    But I read that you have disasembled the laptop at your own hand... hmmm if you have disasembled the notebook then your warrany is not valid anymore :(
    I think this should be clear for you that you can lose the warrany if you disasemble the laptop!
    By the way: you have to speak with the notebook dealer where you have purchased this notebook if you want to return the notebook
    The Toshiba ASP can repair and fix the notebook but you will not get money from ASP.
    Greets

Maybe you are looking for

  • Hp india spoiled hp name

    hello, i am a hp customer from last 15 years, i only bought hp laptops. Now i have the huge missfortune to work in India and here i bought a new laptop from HPindia on internet. I have choosen this product (i was very tented by Lenovo this time) beca

  • Dvd drive not seen in boot camp

    I just installed Windows 8.1 in Boot Camp.  However, windows does not seen the internal DVD drive.  It is not even in Device Manager.  I have installed the latest Apple drivers.  Any help would be appreciated.

  • I suddenly cant open ebay on my laptop, does anyone know why this would happen

    I'm trying to open ebay through firefox and for some reason it wont now open. I have no problem opening anything else. Does anyone have any advice?

  • How to create multiple tables SQL in toplink?

    Table A { field1, field2, field3 Table B { field1, field2, field3 select a.field1,a.field2,b.field3 from a,b where a.field1=b.field1 and a.field2=b.field2 How can I create dynamic sql in toplink as Hibernate HQL? Is there any simple method?Use multip

  • Acroread Error Code List

    I'm working on custom PDF editing tools, compatible with older versions of acroread. In order to debug document errors, I was hoping I could find a listing of the mysterious numeric error code popups generated by acroread. My favorites are the 107 an