Implementing 2 WebViews for different locations with different VC's

I am trying to implement 2 Web views using the storyboard, both linked to another online webpage.
For some reason I don't get any errors, but only the PricesViewController works.
The other one only shows a white page......All help is really apreciated.
I am using these 4 files:
PricesViewcontroller.h
#import <UIKit/UIKit.h>
@interface PricesViewController : UIViewController
    IBOutlet UIWebView *WebView;
@property (nonatomic, retain) UIWebView *WebView;
@end
PricesViewController.m
#import "PricesViewController.h"
@interface PricesViewController ()
@end
@implementation PricesViewController
@synthesize WebView;
- (void)viewDidLoad
    [WebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.domain.com/price.pdf"]]];
[super viewDidLoad];
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    return self;
- (void)didReceiveMemoryWarning
    [super didReceiveMemoryWarning];
@end
ReservationsViewController.h
#import <UIKit/UIKit.h>
@interface ReservationsViewController : UIViewController
    IBOutlet UIWebView *WebView2;
@property (nonatomic, retain) UIWebView *WebView2;
@end
ReservationsViewController.m
#import "ReservationsViewController.h"
@interface ReservationsViewController ()
@end
@implementation ReservationsViewController
@synthesize WebView2;
- (void)viewDidLoad
    [WebView2 loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.be"]]];
    [super viewDidLoad];
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    return self;
- (void)didReceiveMemoryWarning
    [super didReceiveMemoryWarning];
@end

I am trying to implement 2 Web views using the storyboard, both linked to another online webpage.
For some reason I don't get any errors, but only the PricesViewController works.
The other one only shows a white page......All help is really apreciated.
I am using these 4 files:
PricesViewcontroller.h
#import <UIKit/UIKit.h>
@interface PricesViewController : UIViewController
    IBOutlet UIWebView *WebView;
@property (nonatomic, retain) UIWebView *WebView;
@end
PricesViewController.m
#import "PricesViewController.h"
@interface PricesViewController ()
@end
@implementation PricesViewController
@synthesize WebView;
- (void)viewDidLoad
    [WebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.domain.com/price.pdf"]]];
[super viewDidLoad];
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    return self;
- (void)didReceiveMemoryWarning
    [super didReceiveMemoryWarning];
@end
ReservationsViewController.h
#import <UIKit/UIKit.h>
@interface ReservationsViewController : UIViewController
    IBOutlet UIWebView *WebView2;
@property (nonatomic, retain) UIWebView *WebView2;
@end
ReservationsViewController.m
#import "ReservationsViewController.h"
@interface ReservationsViewController ()
@end
@implementation ReservationsViewController
@synthesize WebView2;
- (void)viewDidLoad
    [WebView2 loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.be"]]];
    [super viewDidLoad];
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
    return self;
- (void)didReceiveMemoryWarning
    [super didReceiveMemoryWarning];
@end

Similar Messages

  • Perdiem calculations for multiple locations with different statutory types

    Dear Experts,
    As part of the perdiem calculations, when an employee selected different statutory trip types for different dates in a trip duration,perdiem to be calculated differently.But i am failing to calculate to such type of perdiems.
    For Example :
    Trip duration is, say from 01.05.2014 to 10.05.2014
    Statutory trip types X with amount 200/day, Y with amount 300/day
    When employee select the statutory trip type for  01.05.2014 to 05.05.2014 as X
    and for 06.05.2014 to 10.05.2014 as Y
    As per the scenario
    01.05.2014 to 05.05.2014 (5 days *200) =1000
    06.05.2014 to 10.05.2014 (5 days *300) =1500
    total perdiem amount to be 2500 for the total trip duration
    But my system considering last statutory trip type in calculating total perdiem as 3000 for the entire trip.
    Please provide your suggestions to meet the requirement mentioned above
    Thanks & Regards,
    Y.V.P.Deepak

    Hi Deepak
    Kindly mark correct  if  your question has been solved .
    For your next query , you can post it another post.
    To  post in Fi with amount split , you can work on another badi: TRIP_POST_FI
    There  you can make lot of changes before you post in FI
    Thanks
    Anwar Hossain

  • IPhone Sync everything an different locations with different macs

    Hello,
    i can´t find a really working solution to run my iPhone and sync everything for all of my macs.
    Is there a how-to for syncing everything in both directions?
    Most discussions ending like: don´t waste any time to it, it will never work...
    I won´t accept that it didn´t work.
    And: Sorry for my english...

    Define "everything". The iPhone is designed to sync to _one and only one_ iTunes Library for media content (music, videos, photos, etc.). For contacts, calendars, bookmarks, you can sync to multiple computers. So, if your 'everything' includes music, etc., then start accepting - Apple has limited the iPhone to one computer for that type of content (and connecting to another computer results in the deletion of the content currently on the iPhone).

  • How do I set up different network locations with different wifi?

    I am having an issue setting up different network locations with different wifi profiles on each. I want to do this to enable fast switching of wireless networks. In my house I have two wireless networks, my own personal one and one that is created by using a wifi modem supplied by my company. If I use the company wifi network then I can get into all my work applications without having to enable VPN access separately. It is also faster. However, they also block many applications including sending email from my personal email account, dropbox, etc. So throughout the day I need to switch wireless networks back and forth.
    I was looking for a faster way to switch and thought I would try network locations. Was able to set up a new network location without issue. However it seems that whatever wireless preferences, changes, or wifi network order I put into my "Work" location it carries over to my other location which is the standard "Automatic".
    What I would like it to have my "Work" location only to be able to connect to my work wifi and my other network (Automatic) to just connect to my home wifi only. That way I can enable faster wifi switching and can even use my launcher program (Alfred) to provide shortcuts.
    Anyway to do this?
    Thanks in advance for any help or advice.

    Just thought I would bump this up in the conversation. Doing a further search I came across this discussion which is similar: Connecting to a wireless network via applescript?
    However, I tried to build the Automator application as discussed and cannot get it to work. Very much a novice at Applescript and Shell Script but have created customized Automator services before. All I get now is "Shell Script command encountered an error". No more detail. I copied and pasted the script as shown in the email thread. Is there any other line or command I need to place in front of it?
    Thanks again for any help

  • Price determ. for a Customer with different ship to parties within

    Dear all,
    I will try to explain our need with an example.
    We received a requirement from our sales department who wants to manage a sales price of a specific item which is dependent from a fixed quantity in case the order is placed for a customer with different destinations (different ship to parties).
    The example is as below:
    Sales Price for Customer and Material A is 50u20AC per pieces for a scale of 10 pz.
    The condition type ZPR0 used is a copy of standard PPR0 and it has the following characteristics:
    calculation type Q Quantity
    scales basis C quantity basis and scale formula "0".
    We receive an order by our Customer for 10 pz and for two destinations:
    5 pz directed to the location MMM
    5 pz directed to the location BBB
    The customer is asking us to apply this price because the pre-requisit is satisfied but how can we determine automatically in the same order if the material A is present in several order items?
    We create an order with two sales order items and in each one we specify the destination in the partner roles. How can we set the condition type in order to redetermine the exact price considering the total quantity of material whitin the same order?
    I hope you can help me
    thanks in advance
    Andrea

    Hi
    Your question is not fully clear to me. But what I guess you are looking for a discount which will be applicable to only one order and not for the other orders even if those orders contain the same material.
    If I am correct, than yoy can do it by setting the condition Update. Suppose, you want to give Customer-material specific discount,i.e. condition type K005. Activate the "condition update" check box in the condition type detail screen first.
    Then, in VK31 ,create a condition record for K005 & save it.Go to the change mode (vk32) of the cond. record and now enter " 1 " in the " No.of orders" coulmn & save it.
    Now if you will create an order, this discount will be applicable only for the first one order only and next order onwards it will be deactivated automatically.
    Similarly,You can set it also in terms of quantity,if the condition is calculated based on quantity ,by putting the quantiy (up to what quantity you want it to be effective) in the "Max. condition base value" column.
    Regards
    Pradyumna
    Edited by: pradyumna patel on Jun 24, 2008 11:28 AM

  • HT204053 i RECENTLY PURCHASED ANOTHER IPHONE.  MY INTERNET IS NOT WORKING.  I JUST CREATED AN APPLE ID.  WHAT'S NEXT?  I NOW HAVE TWO DIFFERENT ACCOUNTS WITH DIFFERENT USER NAMES.  HOW CAN I USE ONLY ONE ACCOUNT FOR ITUNES, ICLOUD APPLE ID ETC???

    I RECENTLY PURCHASED ANOTHER IPHONE.  MY INTERNET IS NOT WORKING.  I JUST CREATED AN APPLE ID.  WHAT'S NEXT?  I NOW HAVE TWO DIFFERENT ACCOUNTS WITH DIFFERENT USER NAMES.  HOW CAN I USE ONLY ONE ACCOUNT FOR ITUNES, ICLOUD APPLE ID ETC???

    Welcome to the Apple community.
    iTunes and iCloud and different accounts, you will need to delete both accounts from your device before adding the new details in their place.
    For iCloud go to settings > iCloud, scroll down and hit the delete button. You can then sign back in using your correct details. For iTunes go to settings >store, tap your account ID and then sign out, you can then sign back in using your correct Apple ID.

  • Single invoice for multiple orders with different divisions

    Dear All,
    while I am trying to do single invoice for muliple orders with different divisons invoice is gettting splitted..In copy control vbrk routine I  tried with 003 and 007 etc..but result is same..what configuration need to be done for getting the single invoice
    Thanks In advance
    Regards
    CNRNAIR

    Hello
    single invoice for multiple orders with "different divisions" invoice is getting split
    FYI - Different Division means different Sales Area.
    So, sales doc (whether sales order, Delivery & Billing) is applicable to EXACTLY one sales area.
    Thus, combining docs with different sales area is practically impossible.
    Provided, you are using common division.
    Hope this assist you,
    Thanks & REgards
    JP

  • Can I use two different devices with different apple ID for backing up data on one machine without losing any data that was backed up with one device earlier?

    Can I use two different devices with different apple ID for backing up data on one machine without losing any data that was backed up with one device earlier?

    The link is to a discussion started on 12/18 in the FiOS Internet forum.  Here's the link I get now, however it is different than the link I pulled a few hours ago.  If this system changes the link again, it may not work.
    http://forums.verizon.com/t5/FiOS-Internet/Frustration-and-just-confused-with-internet-help-please/t...
    You can also look for the topic, "frustration and just confused" in the FiOS Internet forum.
    Here's a link that is in the thread that gives more detail.
    https://secure.dslreports.com/faq/15984
    Good Luck!
    P.S.  "Copper Contributor" is my "rank."  gs0b is my user name.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • How to structure the DMA buffer for PXie 6341 DAQ card for analog output with different frequencies on each channel

    I'm using the MHDDK for analog out/in with the PXIe 6341 DAQ card.
    The examples, e.g. aoex5, show a single Timer  (outTimerHelper::loadUI method), but the example shows DMA data loaded with the same vector size.
    There is a comment in the outTimerHelper:rogramUpdateCount call which implies that different buffer sizes per channel can be used.
       (the comment is: Switching between different buffer sizes will not be used)
    Does anyone know what the format of the DMA buffer should be for data for multiple channels with different frequencies ?
    For example, say we want a0 with a 1Khz Sine wave and a1 with a 1.5Khz sine wave.  What does the DMA buffer look like ?
    With the same frequency for each channel, the data is interleaved, e.g.  (ao0#0, ao1#0; ao0#1, ao1#1, ...), but when the frequencies for each channel is different, what does the buffer look like ?

    Hello Kenstern,
    The data is always interleaved because each card only has a single timing engine for each subsystem.
    For AO you must specify the number of samples that AO will output. You also specify the number of channels. Because there is only one timing engine for AO, each AO will channel will get updated at the same time tick of the update clock. The data will be arranged interleaved exactly as the example shows because each AO channel needs data to output at each tick of the update clock. The data itself can change based on the frequency you want to output.
    kenstern wrote:
    For example, say we want a0 with a 1Khz Sine wave and a1 with a 1.5Khz sine wave.  What does the DMA buffer look like ?
    With the same frequency for each channel, the data is interleaved, e.g.  (ao0#0, ao1#0; ao0#1, ao1#1, ...), but when the frequencies for each channel is different, what does the buffer look like ?
    In your example, you need to come up with an update rate that works for both waveforms (1 KHz and 1.5 KHz sine waves). To get a good representation of a sine wave, you need to update more than 10x as fast as your fastest frequency...I would recommend 100x if possible.
    Update Frequency: 150 KHz
    Channels: 2
    Then you create buffers that include full cycles of each waveform you want to output based on the update frequency. These buffers must also be the same size.
    Buffer 1: Contains data for the 1 KHz sine wave, 300 points, 2 sine wave cycles
    Buffer 2: Contains data for the 1.5 KHz sine wave, 300 points, 3 sine wave cycles
    You then interleave them as before. When the data is run through the ADC, they are outputting different sine waves even though the AO channels are updating at the same rate.

  • Logic for correcting strings with different barckets

    can any one tell me the simple logic for correcting strings with different barckets
    suppose say for eg.
    (<{abc}>defgh) should evaluate to TRUE
    (<{abc>} should evaluate to FALSE
    Things to check is
    1. number of opening brace and closing brace
    2. Their position are correct or not
    If the above two conditions are met than it is TRUE else FALSE
    i guess string function with decode and lenght function or case should do but bit difficult to develop this logic in with sql
    Thanks,
    AAK

    Hi,
    Here is non REGEXP_REPLACE version ( Unfotunately dont have 10G to feel the power of REGEXP_REPLACE.
    SQL> ed
    Wrote file afiedt.buf
      1  SELECT DECODE(SUM(CASE
      2                    WHEN Left = '(' AND Right =')' THEN 0+Count_Bracket
      3                    WHEN Left = '<' AND Right ='>' THEN 0+Count_Bracket
      4                    WHEN Left = '{' AND Right ='}' THEN 0+Count_Bracket
      5                    WHEN Left = '[' AND Right =']' THEN 0+Count_Bracket
      6                    ELSE
      7                       1
      8                    END
      9                    )
    10         ,0,'Valid','Invalid')
    11  FROM
    12  (
    13     SELECT SUBSTR(str,(len+1 - level),1) Left, SUBSTR(str,(len + level),1) Right, MOD(LENGTH(str),2)
    14     FROM
    15     (
    16      SELECT
    17         REPLACE(translate('&exp','abcdefgh','        '),' ') str,
    18         LENGTH(REPLACE(translate('&exp','abcdefgh','        '),' '))/2 len
    19      FROM DUAL
    20    )
    21    CONNECT BY LEVEL <= LEN
    22* )
    SQL> /
    Enter value for exp: (<{abc>} )
    old  17:        REPLACE(translate('&exp','abcdefgh','        '),' ') str,
    new  17:        REPLACE(translate('(<{abc>} )','abcdefgh','        '),' ') str,
    Enter value for exp: (<{abc>} )
    old  18:        LENGTH(REPLACE(translate('&exp','abcdefgh','        '),' '))/2 len
    new  18:        LENGTH(REPLACE(translate('(<{abc>} )','abcdefgh','        '),' '))/2 len
    DECODE(
    Invalid
    SQL>
    SQL> /
    Enter value for exp: <{[()]}>
    old  17:        REPLACE(translate('&exp','abcdefgh','        '),' ') str,
    new  17:        REPLACE(translate('<{[()]}>','abcdefgh','        '),' ') str,
    Enter value for exp: <{[()]}>
    old  18:        LENGTH(REPLACE(translate('&exp','abcdefgh','        '),' '))/2 len
    new  18:        LENGTH(REPLACE(translate('<{[()]}>','abcdefgh','        '),' '))/2 len
    DECODE(
    Valid
    SQL>
    SQL> /
    Enter value for exp: ([{<>}])
    old  17:        REPLACE(translate('&exp','abcdefgh','        '),' ') str,
    new  17:        REPLACE(translate('([{<>}])','abcdefgh','        '),' ') str,
    Enter value for exp: ([{<>}])
    old  18:        LENGTH(REPLACE(translate('&exp','abcdefgh','        '),' '))/2 len
    new  18:        LENGTH(REPLACE(translate('([{<>}])','abcdefgh','        '),' '))/2 len
    DECODE(
    Valid
    SQL>
    SQL> /
    Enter value for exp: (<{abc}>defgh)
    old  17:        REPLACE(translate('&exp','abcdefgh','        '),' ') str,
    new  17:        REPLACE(translate('(<{abc}>defgh)','abcdefgh','        '),' ') str,
    Enter value for exp: (<{abc}>defgh)
    old  18:        LENGTH(REPLACE(translate('&exp','abcdefgh','        '),' '))/2 len
    new  18:        LENGTH(REPLACE(translate('(<{abc}>defgh)','abcdefgh','        '),' '))/2 len
    DECODE(
    Valid
    SQL> Note: Only thing needs to care is " translate('<{[()]}>','abcdefgh',' ') " if string has some additional characters please include here.
    Regards

  • Uploaded music to iCloud and it broke up my albums, I now have the same albums in different location with 2 or 3 songs on each one, can I make them whole albums again and how do I keep it from happening again?

    uploaded music to iCloud and it broke up my albums, I now have the same albums in different location with 2 or 3 songs on each one, can I make them whole albums again and how do I keep it from happening again?

    The iTunes Match forum is here: https://discussions.apple.com/community/itunes/itunes_match

  • [svn:fx-trunk] 5445: Fix for - @ copy tag for two methods with different arg lists not working.

    Revision: 5445
    Author: [email protected]
    Date: 2009-03-19 17:47:57 -0700 (Thu, 19 Mar 2009)
    Log Message:
    Fix for - @copy tag for two methods with different arg lists not working.
    Some changes for refactoring.
    QE Notes: None.
    Doc Notes: None.
    Bugs: SDK-19975
    tests: checkintests, asdoc
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19975
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va

    Revision: 5445
    Author: [email protected]
    Date: 2009-03-19 17:47:57 -0700 (Thu, 19 Mar 2009)
    Log Message:
    Fix for - @copy tag for two methods with different arg lists not working.
    Some changes for refactoring.
    QE Notes: None.
    Doc Notes: None.
    Bugs: SDK-19975
    tests: checkintests, asdoc
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19975
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va

  • Different templates with different datasource files

    Hi All,
    Can someone tell me how we can have two different templates with different datasource files in one BIP report.
    I need PDF template based on one xml file and CSV teamplate based on another in one report.
    Thanks.

    you can have two data-set or query , and select concatenated data and have a single xml file.
    But pdf template will look at those, dataset in the xml, which you want. and CSV will look only on the other dataset.
    what method are you using for CSV ?

  • Help! Resizing different documents with different resolutions?

    Hello!
    Please help me with my situation:
    I was trying to make an action that will decrease 1 inch to all sides of my document (the document size was 12x36 inches) and hopefully to other documents.  I don't want to crop the image, I just want to resize the whole image to 10x24 inches, leaving a 1 inch transparent border (the gray and white checkerboard) to my document. I started resizing manually, but it was time-consuming so I tried to make the action I stated above. I was expecting that it would decrease a proportionate 1 inch to the top, bottom, left and right sides of other documents, but it didn't. Any procedure to make this happen in different documents with different sizes and resolutions?
    PS: All the the documents that I will resize would eventually be printed ( I don't know if this would help).
    Thank you for your help!

    Kursover wrote:
    I was trying to make an action that will decrease 1 inch to all sides of my document (the document size was 12x36 inches) and hopefully to other documents. I don't want to crop the image, I just want to resize the whole image to 10x24 inches, leaving a 1 inch transparent border (the gray and white checkerboard) to my document. I was expecting that it would decrease a proportionate 1 inch to the top, bottom, left and right sides of another document, but it didn't. Any procedure to make this happen in different documents with different sizes and resolutions?
    Easy to do in a script not so easy in an action unless you know that there is no background layer or that all have backgounds.  You can not add transparent canvas to a document with a background layer for brckground layers do not support transparence. Documents may or mant not have a background layer and background layers can be converted to a normal layer.  Actions can not use logic without using a script to see if there is a background.  My Crafting Actions package contains a utility script for actions that will convert background layers to a normal layer should a document have a background layer. Once you know there is no "Background" the rest is easy to do in an action with menu limage canvas size check relative and set width and height to 1" the will add 1"
    Decreasing -1" will CROP any layer the has not transparent pixels in the outter 1"
    Crafting Actions Package
    Contains
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file.
    A script can retrieve the width and height of a document to changs size you need to resize the document this will not crop but will resample and you most matain aspect ratio elss resize will distort. Decreasing canvas size may crop...
    12 Scripts for actions
    Example
    Download

  • Display of text of different rows with different color - JTable

    Hi all !
    I have struck in a problem. I have to display the different rows with different color in the JTable. I have created an arraylist in the model class, which stores color of all the rows. Now in renderer class, I am just picking up color from the arraylist, taking rowIndex as index for arraylist. I used to set foreground color for each row in the renderer class. The problem is that it is not showing all the rows properly, sometimes it show all the rows correctly, but as i resize the window/panel, it starts behaving abnormally, some text is painted properly, but other aren't.
    Does anybody have any solution regarding this problem.
    One thing i want to mention is that in getTableCellRendererComponent() method, i used to retrive the color everytime, and setting the foreground color of the text. Is this a right approach or some other technique have to be followed.
    here is code of renderer class ---
    import java.awt.*;
    import javax.swing.*;
    * Renderer to plot stage record table.
    public class ExStageCellRenderer extends javax.swing.table.DefaultTableCellRenderer
        Color curColor;
         * returns component to be painted, overridding this method from
         * DefaultCellRenderer
         * @param table
         *            table whose component has to be plotted
         * @param value
         *            value of that particular cell
         * @param isSelected
         *            is Cell selected
         * @param hasFocus
         *            has the cell got focus
         * @param row
         *            row of the cell
         * @param column
         *            column of the cell
         * @return painted component
        public Component getTableCellRendererComponent (JTable table, Object value, boolean isSelected, boolean hasFocus, int row,
                int column)
            Component component = super.getTableCellRendererComponent (table, value, isSelected, hasFocus, row, column);
            ExStageDataModel model = (ExStageDataModel)table.getModel ();       
            if (curColor instanceof Color) {
                    curColor = model.getColor(row);
                } else {
                    // If color unknown, use table's foreground color
                    curColor = table.getForeground();
            String tooltip = "";
            StringBuffer stringBuffer = new StringBuffer ();
            for (int i = 0; i < table.getColumnCount (); i++)
                    Object Value = table.getValueAt (row, i);
                    if (Value == null) continue;
                    stringBuffer.append (Value.toString () + "    ");
            tooltip += stringBuffer.toString ();
            tooltip = tooltip.trim ();
            ((JComponent) component).setToolTipText (tooltip);
            if (column == 1)
                this.setHorizontalAlignment (SwingConstants.CENTER);
            else if (column == 0 || column == 4 || column == 5)
                this.setHorizontalAlignment (SwingConstants.LEFT);
            else
                this.setHorizontalAlignment (SwingConstants.RIGHT);
            // LOOK!! should turn tip off if there is none !!
            component.setForeground (this.curColor);
            //System.out.println("render : " + component.getBounds ());
            //component.validate ();
            component.update (component.getGraphics ());
            return component;
    Waiting for reply....
    Code snooker

    Hmm, why are you doing the curColor instanceof? What does this accomplish? I don't see any reason to ask what it was before; all you should be interested in here is what you want it to be now.
    All you should have to do is say:
    this.setForeground(model.getColor(row));I also don't see why you're doing the update() -- JTable is going to do that for you at the appropriate time, you have no idea if now is the right time to do it or not. In fact it probably isn't, you're probably updating the previously-drawn cell with your new color and alignment, which may be the strange behavior you're seeing.
    Also, I don't see why you're doing the super. All that's going to do is return "this", so why not just use "this"?
    Well, without knowing your larger code or exactly what you're trying to accomplish, maybe I'm just missing something.
    I've just recently been working on a program where I had some similar requirements -- different foreground and background colors and alignment -- and I found it much cleaner to create a class to hold all this data, and then create a default renderer for that class. Then I made some constructors for this "attribute" class that let me set whatever I need, like
    public CellAttrib(String s,Color c,int alignment,Border border)
      this.s=s;
      this.c=c;
      this.border=border;
    // with suitable defaults ...
    pubic CellAtrtrib(String s)
      this.s=s;
      this.c=Color.BLACK;
      this.border=null;
    }Then the renderer just queried the cell-attributes class, as in:
    setForeground(value.getColor());
    setHorizontalAlignment(value.getAlignment());
    setBorder(value.getBorder);

Maybe you are looking for

  • While posting invoice f-22

    Hi...gurus while posting sales invoice ( T-code f-22), accrued error  Cost center 1111111 in controlling area xxx is locked for revenue postings on 15.05.2011.

  • How can I access the Settings, Accounts section when it is greyed out?

    I have successfully upgraded 4S to iOs7. When I go to check my email, I continually get the message that I need to read the new iCloud terms. When I click ok I am directed to the Settings / Mail, Contacts, Calendars page. The Accounts section is grey

  • Portal Tools Installation

    i have been trying to install Portal Tools in my 9iAS rel.2 Portal but i always get an Internal Server error when testing the provider. My jpdk is working fine. I just need to install this. Hope you can help me with this. thanks

  • QI stocks to unrestricted

    Hi, I have QI stocks and I need it to transfer to unrestricted.But when itried to apply Usage decision,the stock did not transfer from Qi to unrestricted stock I also did 321 mvt but was not able to proceed with it bec the system prompts an error "Ch

  • Do refurbished computers purchased after oct. 1 get to download iWork free?

    Just ordered a refurbished macbook pro retina yesterday and was wondering I qualified for the free download of pages, numbers, and keynote. Just wondering because  I ordered the refurbished not brand new.