Need JSP reassurance with JDB - Please.

Hi there,
I have recently taken on a JSP project for a client, during which their technical department withdrew the offer of access to their relational database (oracle). A solution was required in order to keep the project alive. I chose to work with the Berkeley Database Java Edition. The site uses AJAX calls to trigger calls to the JDB via JSP pages for a range of operations such as user information, event information, media playlist info etc...
So far things are going very well and the database is performing all of the tasks that I require. However currently its just myself and a couple of other users from my company testing the site. The client expects up to 600 000 users. Potentially this may mean hundreds of writes per second. I am worried about handling the multiple writes in rapid sequence...
I am using the direct persistence layer and am not currently using any concurrency measures as thread safety is a little beyond my Java comfort level - also I'm not sure if they are required for this use. If one JSP page request is writing to the same database as another will the first request lock the database automagically until it is finished?
I know code always helps, so lets take this simplified example - an AJAX function calls an 'updateUserInfo.jsp' page that contains the following code:
<%@ page import="schemas.user.*" %>
<%
response.setContentType("text/html");
response.setHeader("Cache-Control", "no-cache");
String userNumber = request.getParameter("userNumber");
String userName = request.getParameter("userName");
String userEmail = request.getParameter("userEmail");
String userPassword = request.getParameter("userPassword");
UserStorePut usp = new UserStorePut();
usp.run(userNumber, userName, userEmail, userPassword);
response.getWriter().write("success");
%>
The corresponding userStorePut class:
package schemas.user;
import java.io.File;
import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.Environment;
import com.sleepycat.je.EnvironmentConfig;
import com.sleepycat.persist.EntityStore;
import com.sleepycat.persist.StoreConfig;
import schemas.autoint.*;
public class UserStorePut {
     private static File envHome = new File("/usr/local/bea/wlserver_10.3/samples/server/examples/build/mainWebApp/WEB-INF/classes/schemas/JEDB");
private Environment envmnt;
private EntityStore store;
private UserDA sda;
// The setup() method opens the environment and store
// for us.
public void setup()
throws DatabaseException {
EnvironmentConfig envConfig = new EnvironmentConfig();
StoreConfig storeConfig = new StoreConfig();
envConfig.setAllowCreate(true);
storeConfig.setAllowCreate(true);
// Open the environment and entity store
envmnt = new Environment(envHome, envConfig);
store = new EntityStore(envmnt, "EntityStore", storeConfig);
// Close our environment and store.
public void shutdown()
throws DatabaseException {
store.close();
envmnt.close();
// Populate the entity store
public void run(String userNumber, String userName, String userEmail, String userPassword)
throws DatabaseException {
setup();
// Open the data accessor. This is used to store
// persistent objects.
sda = new UserDA(store);
// Instantiate and store some entity classes
UserEntity sec1 = new UserEntity();
sec1.setUserNumber(userNumber);
          sec1.setUserName(userName);
sec1.setEmail(userEmail);
          sec1.setPassword(userPassword);
sda.pIdx.put(sec1);
shutdown();
Thanks in advance if anyone will take the time to help me resolve this concern.
Regards,
Reece.

Hi Reece,
Hundreds of writes per second is an easy requirements for JE to meet, and thousands of writes per second is common. You don't have to synchronize to do writes from multiple threads -- this is documented in the Getting Started guide, and the Transaction guide has information you should take a look at. You should be configuring the store as transactional if you define any secondary indices.
One thing you're doing that will NOT perform well is that you're opening and closing the JE environment and store every time you do a put operation. The environment and store should be opened when your application starts and left open as long as your application is running. The overhead of opening and closing these objects is high, and not intended to be done often.
JSP provides access to the servlet application context, and you should probably store your UserStorePut object there, calling your setup method only once. You should call your shutdown method only once when the application is stopped normally. You may need to talk to people on a JSP forum about how to do this, as our JE team does not have experience in this area. Other users on the forum may be able to help, but a JSP forum is your best bet if you can't figure this out from the JSP docs.
If the application stops abnormally, your data will still be intact when it starts up again, but the initial creation of the Environment object (what is called "recovery") will take longer. Please see the discussion of durability in the Transaction user guide.
There is no way around having to read the Getting Started and Transaction guides if you intend to deploy an application, so I strongly encourage you to do so.
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Need urgent help with application please

    Hi i have a project for school. The application is a ball that bounces around in the frame and everytime it hits a wall it changes color and a popup menu is needed to change background color and to change the speed of the ball. I have so far got the ball to bounce and change color everytime it hits a wall and i also have a popup menu to change background color but im having trouble putting slow and fast modes on the popup menu. Below is my source code. Thread.sleep(10) is what determines the speed but i cant get it to be on the popup menu. Can somebody please help me. Thanks
    code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class WormX extends Panel implements ActionListener, Runnable{
    private String[] colorNames =
    { "White", "Gray", "Red",
    "Blue", "Black"};
    private String[] speeds =
    {"Slow", "Fast"};
    private Color[] colors =
    { Color.white, Color.gray, Color.red,
    Color.blue, Color.black };
    private PopupMenu menu;
    private PopupMenu menu1;
    final int WIDTH = 280, HEIGHT = 230;
    public static void main(String[] args) {
    Frame f = new Frame();
    f.addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent e) {
    System.exit(0);
    WormX wx = new WormX();
    wx.setSize(320,250); // same size as defined in the HTML APPLET
    f.add(wx);
    f.pack();
    wx.init();
    f.setSize(320,250 + 20); // add 20, seems enough for the Frame title,
    f.show();
    wx.start();
    public void start(){
    Thread t = new Thread(this);
    t.start();
         PopupMenu popup;
    int headx, heady, xinc, yinc;
    Color color;
    public void paint(Graphics g){
    g.setColor(color);
    g.drawString("OOO", headx, heady); //This is what the worm looks like.
    public void run(){
    while (true){
    putWorm();
    repaint();
    try{
    Thread.sleep(10); //This adjusts the speed of the worm
    catch (InterruptedException e){
    e.printStackTrace();
    void checkWorm(){                      //checkworm is the coding for changing the colour of the worm
    if ((headx >= WIDTH) || (headx <= 0)){
    xinc *= -1;
    changeColor();
    else if ((heady >= HEIGHT) || (heady <= 0)){
    yinc *= -1;
    changeColor();
    void changeColor(){    color = new Color((int)(Math.random() * 1677721));
    void putWorm(){
    headx += xinc;
    heady += yinc;
    checkWorm();
         public void init() {
    xinc = 2;
    yinc = 2;
    color = Color.black; //This is the base colour of the worm
    headx = (int)((Math.random() * WIDTH / 2) + WIDTH / 4);
    heady = (int)((Math.random() * HEIGHT / 2) + HEIGHT / 4);
    resize(WIDTH, HEIGHT);
         setBackground(Color.gray);
    menu = new PopupMenu("Background Color");
    enableEvents(AWTEvent.MOUSE_EVENT_MASK);
    MenuItem colorName;
    for(int i=0; i<colorNames.length; i++) {
    colorName = new MenuItem(colorNames);
    menu.add(colorName);
    colorName.addActionListener(this);
    menu.addSeparator();
    add(menu);
    menu1 = new PopupMenu("Speed");
    enableEvents(AWTEvent.MOUSE_EVENT_MASK);
    MenuItem speed;
    for(int i=0; i<speeds.length; i++) {
    speed = new MenuItem(speeds[i]);
    menu.add(speed);
    speed.addActionListener(this);
    menu.addSeparator();
    add(menu);
    public void actionPerformed(ActionEvent event) {
    setBackground(colorNamed(event.getActionCommand()));
    repaint();
    public void processMouseEvent(MouseEvent event) {
    if (event.isPopupTrigger())
    menu.show(event.getComponent(),
    event.getX(), event.getY());
    super.processMouseEvent(event);
    private Color colorNamed(String colorName) {
    for(int i=0; i<colorNames.length; i++)
    if(colorNames[i].equals(colorName))
    return(colors[i]);
    return(Color.white);

    I honestly don't know. I never had this Exception.
    But look at the API:
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/InterruptedException.html
    Obviously, Java doesn't like what you do with your thread. Altogether, I'm not sure if your design isn't flawed. Basically, you pause your whole application regularly, so that it seems that you have a regular time flow. This is like doing slow motion on your DVD player by constantly pressing "play" and "pause".
    Think about using the swing timer instead:
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/Timer.html
    So, instead of binding your moving object to your main class, you can trigger it by the timer. Think about it.
    Edit: As I see now, you DID catch the InterruptedException around the Thread.sleep(10) in your original code. Why did you do it in the first place, and why don't you now?
    You can just catch the Exception, and leave it like that. However, when an Exception occurs regularly, it would be better to know why.
    Editedit: Also, you declare the same class which is a panel als as a thread. AWT/Swing don't like it when create new Threads for the GUI, since AWT/Swing bring their own Thread for Event Handling. So, whatever you do with any kind of Threads, do it in some class which doesn't inherit from some visual component!

  • Need urgent help with CS4 please

    i got a transferred reg key for CS4 premium volume, the proble is that i have installed and been working with it for ver 10 months now, everythink ok, but recently i had to erase my disk completly cause a virus and now i installed ir again, from the original, and every program in in keeps saying "licensing expired" can someone tell me why this happens? ive tried to call support and they say to be available til monday, i have a big deadline on monday! what can i do, please!

    http://kb2.adobe.com/cps/405/kb405970.html
    Bob

  • I need to know how to search for malware files, apple told me to contat you, I am getting popup and malicious warnings and need to talk with someone please

    I began getting popups for Microsoft malware alerts/Mackeeper zeobits/and othe ads. I am on a Mac OS 8.5.
    I downloaded virus protection, adware protection and ran them all and got nothing. Then I got a phoney call from the "microsoft technicians, so called Applecare and they told me what files to search for if it was Safari and suggested I contact Firefox. Below are the files we search for on my hard drive, but because I use Firefox
    they suggested I contact you as I am somewhat concerned. Can you help advise, thanks
    /Library/LaunchAgents/com.vsearch.agent.plist
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework

    Thanks, I am not sure if this is what you are asking for but here goes
    Application Basics
    Name: Firefox
    Version: 32.0.1
    User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:32.0) Gecko/20100101 Firefox/32.0
    Crash Reports for the Last 3 Days
    All Crash Reports
    Extensions
    Name: Strict Pop-up Blocker
    Version: 0.2
    Enabled: true
    ID: jid1-P34HaABBBpOerQ@jetpack
    Graphics
    Device ID: 0x 166
    GPU Accelerated Windows: 1/1 OpenGL (OMTC)
    Vendor ID: 0x8086
    WebGL Renderer: Intel Inc. -- Intel HD Graphics 4000 OpenGL Engine
    windowLayerManagerRemote: true
    AzureCanvasBackend: quartz
    AzureContentBackend: quartz
    AzureFallbackCanvasBackend: none
    AzureSkiaAccelerated: 0
    Important Modified Preferences
    browser.cache.disk.capacity: 358400
    browser.cache.disk.smart_size_cached_value: 358400
    browser.cache.disk.smart_size.first_run: false
    browser.cache.disk.smart_size.use_old_max: false
    browser.cache.frecency_experiment: 1
    browser.history_expire_days.mirror: 180
    browser.places.importBookmarksHTML: false
    browser.places.importDefaults: false
    browser.places.leftPaneFolderId: -1
    browser.places.migratePostDataAnnotations: false
    browser.places.smartBookmarksVersion: 7
    browser.places.updateRecentTagsUri: false
    browser.search.useDBForOrder: true
    browser.sessionstore.restore_on_demand: false
    browser.sessionstore.upgradeBackup.latestBuildID: 20140911151253
    browser.startup.homepage: https://www.google.com/
    browser.startup.homepage_override.buildID: 20140911151253
    browser.startup.homepage_override.mstone: 32.0.1
    browser.tabs.loadInBackground: false
    browser.tabs.warnOnClose: false
    dom.mozApps.used: true
    dom.w3c_touch_events.expose: false
    extensions.lastAppVersion: 32.0.1
    gfx.blacklist.webgl.msaa: 4
    keyword.URL: http://search.freecause.com/search?fr=freecause&ourmark=3&type=63395&p=
    network.cookie.prefsMigrated: true
    places.database.lastMaintenance: 1410624969
    places.history.enabled: false
    places.history.expiration.transient_current_max_pages: 104858
    places.last_vacuum: 1352065358
    plugin.disable_full_page_plugin_for_types: application/vnd.fdf,application/vnd.adobe.xdp+xml,application/vnd.adobe.xfd+xml,application/pdf
    plugin.importedState: true
    print.macosx.pagesetup-2: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHBsaXN0IFBVQkxJQyAiLS8vQXBwbGUvL0RURCBQTElTVCAxLjAvL0VO
    print.print_bgcolor: false
    print.print_bgimages: false
    print.print_colorspace:
    print.print_command:
    print.print_downloadfonts: false
    print.print_duplex: 1
    print.print_evenpages: true
    print.print_in_color: true
    print.print_margin_bottom: 0.5
    print.print_margin_left: 0.5
    print.print_margin_right: 0.5
    print.print_margin_top: 0.5
    print.print_oddpages: true
    print.print_orientation: 0
    print.print_page_delay: 50
    print.print_pagedelay: 500
    print.print_paper_data: 0
    print.print_paper_height: 11.00
    print.print_paper_name:
    print.print_paper_size_type: 1
    print.print_paper_size_unit: 0
    print.print_paper_width: 8.50
    print.print_plex_name:
    print.print_printer:
    print.print_resolution: 0
    print.print_resolution_name:
    print.print_reversed: false
    print.print_scaling: 1.00
    print.print_shrink_to_fit: true
    print.print_to_file: false
    print.print_unwriteable_margin_bottom: 56
    print.print_unwriteable_margin_left: 25
    print.print_unwriteable_margin_right: 25
    print.print_unwriteable_margin_top: 25
    privacy.clearOnShutdown.cache: false
    privacy.clearOnShutdown.cookies: false
    privacy.clearOnShutdown.downloads: false
    privacy.clearOnShutdown.formdata: false
    privacy.clearOnShutdown.sessions: false
    privacy.cpd.cache: false
    privacy.cpd.cookies: false
    privacy.cpd.formdata: false
    privacy.cpd.sessions: false
    privacy.donottrackheader.enabled: true
    privacy.item.cache: false
    privacy.item.downloads: false
    privacy.item.formdata: false
    privacy.item.sessions: false
    privacy.sanitize.migrateFx3Prefs: true
    privacy.sanitize.timeSpan: 0
    security.disable_button.openCertManager: false
    security.disable_button.openDeviceManager: false
    security.warn_viewing_mixed: false
    storage.vacuum.last.index: 1
    storage.vacuum.last.places.sqlite: 1409681987
    JavaScript
    Incremental GC: true
    Accessibility
    Activated: false
    Prevent Accessibility: 0
    Library Versions
    NSPR
    Expected minimum version: 4.10.6
    Version in use: 4.10.6
    NSS
    Expected minimum version: 3.16.4 Basic ECC
    Version in use: 3.16.4 Basic ECC
    NSSSMIME
    Expected minimum version: 3.16.4 Basic ECC
    Version in use: 3.16.4 Basic ECC
    NSSSSL
    Expected minimum version: 3.16.4 Basic ECC
    Version in use: 3.16.4 Basic ECC
    NSSUTIL
    Expected minimum version: 3.16.4
    Version in use: 3.16.4
    Experimental Features
    ---------------------

  • I need some help with AVI and IDX files please.

    Hello there,
    I've just been given a hard drive with a load of media on it that I need to work with in FCP.
    There's a folder with many .AVI clips, and each clip has an accompanying directory file with the extension .IDX
    The format of the AVI files is DV, 720x576, 48kHz.
    For the life of me, I can't get FCP to accept the media. Log and Transfer won't accept them, and if i bring in the AVI files in on their own using File>Import>Files... I get a message saying:
    Media Performance Warning
    It is highly recommended that you either recapture the media or use the Media manager to create new copies of the files to improve their performance for multi-stream playback.
    I can click 'OK' for this message and the media will appear in the browser, but If I place one of these AVI files on a new conformed sequence, the audio needs rendering. (Sequence settings correspond to media settings)
    I tried just changing the wrapper from AVI to MOV, thinking I could fool FCP into accepting them, but I get the same rejection.
    I thought the audio and video signals might be muxed, so I tried MPEG Streamclip to sort that out, but even MPEG Streamclip doesn't accept the media, saying : File open error: Can't find video or audio tracks.
    Could anybody advise me on how to get the most out of these media files please?
    Thanks in advance.
    James.
    Message was edited by: James M.
    Message was edited by: James M.

    yes. I tried transcoding in QT, but they still come in with the same audio rendering required. I'm a bit loath to convert them all though, as there are 1400 clips.
    It's not a huge problem, as they do play in FCP, but I'd like to sort out the audio rendering. I don't understand why it needs rendering as the media and sequence audio settings match, and it's not some weird format or anything, it's bog standard 48kHz stereo.

  • Please I need some help with a table

    Hi All
    I need some help with a table.
    My table needs to hold prices that the user can update.
    Also has a total of the column.
    my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
    I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
    I have tried using but as I need to set the toal with something like total
        totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
    Can any one please advise on some way I can get this to work ?
    Thanks for reading
    Craig

    Hi there camickr
    thanks for the help the other day
    this is my full code....
    package printing;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.DecimalFormat;
    public class tablePanel
        extends JDialog  implements Printable {
      BorderLayout borderLayout1 = new BorderLayout();
      private boolean printing = false;
      private Dialog1 dialog;
      JPanel jPanel = new JPanel();
      JTable table;
      JScrollPane scrollPane1 = new JScrollPane();
      DefaultTableModel model;
      private String[] columnNames = {
      private Object[][] data;
      private String selectTotal;
      private double total;
      public tablePanel(Dialog1 dp) {
        dp = dialog;
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      public tablePanel() {
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      private void jbInit() throws Exception {
        jPanel.setLayout(borderLayout1);
        scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
        this.add(jPanel);
        jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
        scrollPane1.getViewport().add(table);
        jPanel.setOpaque(true);
        newTable();
        addToModel();
        addRows();
        setTotal();
    public static void main(String[] args) {
      tablePanel tablePanel = new  tablePanel();
      tablePanel.pack();
      tablePanel.setVisible(true);
    public void setTotal() {
      total = 0;
      int i = table.getRowCount();
      for (i = 0; i < table.getRowCount(); i++) {
        String name = (String) table.getValueAt(i, 1);
        if (!"".equals(name)) {
          if (i != table.getRowCount() - 1) {
            double dt = Double.parseDouble(name);
            total = total + dt;
      String str = Double.toString(total);
      table.setValueAt(str, table.getRowCount() - 1, 1);
      super.repaint();
      public void newTable() {
        model = new DefaultTableModel(data, columnNames) {
        table = new JTable() {
          public Component prepareRenderer(TableCellRenderer renderer,
                                           int row, int col) {
            Component c = super.prepareRenderer(renderer, row, col);
            if (printing) {
              c.setBackground(getBackground());
            else {
              if (row % 2 == 1 && !isCellSelected(row, col)) {
                c.setBackground(getBackground());
              else {
                c.setBackground(new Color(227, 239, 250));
              if (isCellSelected(row, col)) {
                c.setBackground(new Color(190, 220, 250));
            return c;
        table.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2) {
            if (e.getClickCount() == 1) {
              if (table.getSelectedColumn() == 1) {
       table.setTableHeader(null);
        table.setModel(model);
        scrollPane1.getViewport().add(table);
        table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
      public void addToModel() {
        Object[] data = {
            "Price", "5800"};
        model.addRow(data);
      public void addRows() {
        int rows = 20;
        for (int i = 0; i < rows; i++) {
          Object[] data = {
          model.addRow(data);
      public void printOut() {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPrintable(tablePanel.this);
        pj.printDialog();
        try {
          pj.print();
        catch (Exception PrintException) {}
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(Color.black);
        int fontHeight = g2.getFontMetrics().getHeight();
        int fontDesent = g2.getFontMetrics().getDescent();
        //leave room for page number
        double pageHeight = pageFormat.getImageableHeight() - fontHeight;
        double pageWidth =  pageFormat.getImageableWidth();
        double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
        double scale = 1;
        if (tableWidth >= pageWidth) {
          scale = pageWidth / tableWidth;
        double headerHeightOnPage = 16.0;
        //double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
        //System.out.println("this is the hedder heigth   " + headerHeightOnPage);
        double tableWidthOnPage = tableWidth * scale;
        double oneRowHeight = (table.getRowHeight() +  table.getRowMargin()) * scale;
        int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
        double pageHeightForTable = oneRowHeight *numRowsOnAPage;
        int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
        if (pageIndex >= totalNumPages) {
          return NO_SUCH_PAGE;
        g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    //bottom center
        g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages),  (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
        g2.translate(0f, headerHeightOnPage);
        g2.translate(0f, -pageIndex * pageHeightForTable);
        //If this piece of the table is smaller
        //than the size available,
        //clip to the appropriate bounds.
        if (pageIndex + 1 == totalNumPages) {
          int lastRowPrinted =
              numRowsOnAPage * pageIndex;
          int numRowsLeft =
              table.getRowCount()
              - lastRowPrinted;
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(oneRowHeight *
                                     numRowsLeft));
        //else clip to the entire area available.
        else {
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(pageHeightForTable));
        g2.scale(scale, scale);
        printing = true;
        try {
        table.paint(g2);
        finally {
          printing = false;
        //tableView.paint(g2);
        g2.scale(1 / scale, 1 / scale);
        g2.translate(0f, pageIndex * pageHeightForTable);
        g2.translate(0f, -headerHeightOnPage);
        g2.setClip(0, 0,
                   (int) Math.ceil(tableWidthOnPage),
                   (int) Math.ceil(headerHeightOnPage));
        g2.scale(scale, scale);
        //table.getTableHeader().paint(g2);
        //paint header at top
        return Printable.PAGE_EXISTS;
    class TableRenderDollar extends DefaultTableCellRenderer{
        public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean isFocused,
          int row, int column) {
            setHorizontalAlignment(SwingConstants.RIGHT);
          Component component = super.getTableCellRendererComponent(
            table,
            value,
            isSelected,
            isFocused,
            row,
            column);
            if( value == null || value .equals("")){
              ( (JLabel) component).setText("");
            }else{
              double number = 0.0;
              number = new Double(value.toString()).doubleValue();
              DecimalFormat df = new DecimalFormat(",##0.00");
              ( (JLabel) component).setText(df.format(number));
          return component;
    }

  • I cannot use a website I need to use, with Firefox 5.0. So, I need to uninstall and go back to 3.5 or 3.6. Please advise. Also, my control panel locks up since Windows Explorer has pbms. Which is why I am using Firefox instead. Thanks for any help!

    I cannot use a website I need to use, with Firefox 5.0. So, I need to uninstall and go back to 3.5 or 3.6. Please advise. Also, my control panel locks up since Windows Explorer has pbms. Which is why I am using Firefox instead. Thanks for any help!

    ''I figured it was going to be FAFSA causing your problem.''
    Install Portable Firefox 3.6.x to your hard drive for that one website. It won't affect your current Firefox installation at all. <br />
    http://portableapps.com/apps/internet/firefox_portable/localization#legacy36

  • I bought Adobe Acrobat Pro 9 and I need to reinstall it. Please could you provide me with a link. (I

    I bought Adobe Acrobat Pro 9 (in 2011)and I need to reinstall it. Please could you provide me with a link for download for MAC OSX. (I have the serial number in my adobe account.)

    Hi Rebmay ,
    You can download the trial version of Acrobat IX pro from the below mentioned link and activate it with the serial number.
    http://prodesigntools.com/all-adobe-cs5-direct-download-links.html
    Notes : Please follow these important instructions carefully or the link will not work!
    Thanks!
    Eshant

  • PLEASE HELP ME.  Some important emails have gone to an archive mail box and i really need them.  Can someone please help me with how to view the archive email box and the emails that are in there?

    PLEASE HELP ME.  Some important emails have gone to an archive mail box and i really need them.  Can someone please help me with how to view the archive email box and the emails that are in there?

    http://kb.mozillazine.org/Recovering_deleted_mail_accounts

  • HT5622 i need help using the icloud it is not making any since to me can some one call me and help me with it please don't try to help me through email i need to talk and listen i don't understand instruction by reading

    i need help using the icloud it is not making any since to me can some one call me and help me with it please don't try to help me through email i need to talk and listen i don't understand instruction by reading.
    <Phone Number Edited by Host>

    You aren't addressing anyone from Apple here.  This is a user forum.
    You might want to call a neaby Apple store to see if they have a free class you could attend.

  • Need help with Fancybox please

    Hola
    I need some help with Fancybox.
    I bought this template and it came without facybox, so I thought
    that this will be a great help to learn some about jQuerry, but I'm lost
    Why is NOT working on my page?
    I just cannot figure this out.
    Can you please check my page?
    http://tummytime.biz/pages/portfolio_fancy.html
    I got Windows 8, Dreamweaver CC
    Thanks a lot.

    There are a couple things that could be causing a couple browsers' collective heads to implode.
    Remove the <! right before your </head> tag...
    </script>
    <!
    </head>
    <body>
    You have two calls to the fancybox css file, you only need one.
    Aside from that I'm not seeing any code problems jump out at me.
    EDIT: Ah, didn't scroll far enough. You have more than one reference to the jquery library. Typically, only one is needed and two or more will cause them all to fail. Usually, you can use the "latest" link and cover all your bases.
    If you aren't using those referenced scripts at the bottom of your page, delete them.

  • Need Help With Home Please

    If anyone here is good with Java, I need serious help with my homework, please give me your instant messenger screen name and we can chat, thanks alot!!
    Angela

    I don't understand how people get themselves into
    these situations as school, if you don't want to learn
    it don't sign up for the class.....You never got yourself into this situation.... I think everyone has on occassion.
    My very first "serious" university program was to solve a second order, non-linear differential equation using the Runge-Kutta method. This is NOT the easy way to learn a computer language and I have to admit I did take "shortcuts" using more experienced people than me.
    That was before the web though...
    God am I really that old?

  • I have need help with something Please respond Quickly :)

    I have need help with something Please respond Quickly  ok so i have the linksys wrt54g Version 2.2 and i upgraded the firmware to V4.21.4 from this site http://homesupport.cisco.com/en-us/wireless/lbc/WRT54G and i clicked V2.2 for the router. So after i upgraded i lost internet ability i can't use the internet so i had to downgrade back to V4.21.1 but i want the things that newer update sloves. Please Help. Everything thing says DNS error? aka Modem.
    $$Cgibbons$$

    Ya i tried that i tried restoring and redoing everything when i downgrade back to .1 it works fine though?
    $$Cgibbons$$

  • I need a laptop with these specificat​ions (or something close). Please advise so I can order. Thanks

    CPU: Intel® Core™ Ci7 870 Processor 2.93GHz turbo upto 3.60 GHz min. core i5
    RAM: 4GB DDR3 
    Operating System: Win 7 Pro Orignal 
    Hard Disk Drive: 500 GB max
    Also it has to be a lightweight laptop.
     I need a laptop with these specifications (or something close). Please advise so I can order. Thanks

    http://www.bestbuy.com/site/ASUS+-+Laptop+/+Intel%​26%23174%3B+Core%26%23153%3B+i7+Processor+/+17.3%2​...
    That's about as close as I could find.
    Can I ask your budget? That's a fairly pricey machine you're looking for.
    If you like my post, or solution to your issue/question, go ahead and click on the little star by my name and/or accept the post as the Solution. It makes me happy.
    I'm NOT an employee of Best Buy, or Geek Squad, though I did work as an Agent for a year 5 years ago. None of my posts are to be taken as the official stance that Best Buy will take on your situation. My advice is just that, advice.
    Unfortunately, that's the bad luck of any electronic, there's going to be bad Apples... wait that's a horrible pun.

  • HT200126 My kid played with the update on my Apple TV. Now it can't play anymore. There is an image on the scrren showing needing connectiong to iTunes. Please show me what to do next. Thanks.

    My kid played with the update on my Apple TV. Now it can't play anymore. There is an image on the scrren showing needing connectiong to iTunes. Please show me what to do next. Thanks.

    Plug the Apple TV into your computer and do a restore if it doesn't happen automatically.

Maybe you are looking for