Importing packages at the same level

Hi,
I have two packages A at B (with some classes) in the same level. How do i import the classes from one packages to other.......

Hi,
By level i mean that the packages are in the same directory.
I created two packages A & B. In the classes belonging to A, i used
package A; import B.*;
In the classes belonging to B i used
package B; import A.*;
I then tried to run the program in JCreator IDE. But it generated error as package is missing.
I also tried to place both packages in another package 'C'. i.e. C\A and C\B. In A's classes i used
package C.A; import C.B.*;
In B's classes I used package
C.B; import C.A.*;
Even then i got the same error and also moreover i was unable to access other classes in a package by a class belonging to the same package.
Kindly help me out.

Similar Messages

  • How to import a class from a package at the same level

    Hello friends,
    i have a class as Plaf.java
    as
    package org.vaibhav.swing.plaf;
    import java.awt.*;
    import javax.swing.*;
    public class Plaf {
    other code
    }as you see, this is in org.vaibhav.swing.plaf package.
    I have one more class as
    package org.vaibhav.swing.frames;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class StartFrame extends JFrame implements ActionListener {
    other code
    }and this class is in package org.vaibhav.swing.frames
    Please hlp me how to use the class Plaf in StartFrame.java. Rather what import statement should i use in StartFrame.java.
    please help.
    thank you
    Message was edited by:
    vaibhavpingle

    but it then gives me this error
    StartFrame.java:11: package org.vaibhav.swing.plaf
    does not exist
    import org.vaibhav.swing.plaf.*;
    Have you first compiled Plaf.java and saved it in this directory strucuture
    /org/vaibhav/swing/plaf/
    And also have you set your classpath to the parent directory of org folder.
    Message was edited by:
    qUesT_foR_knOwLeDge

  • Is there a way to "mix" the nodes and leaves of the tree so if they are at the same level, they will display in a specified order.

    Is there a way to "mix" the nodes and leaves of the tree so that even if they are at the same level (1,2,3...), they will display in a specified order (via sort sequence, alphabetical, etc.).
    History:
    We are using the Tree UI element to display/manage a material bom interface. We seem to be running into an issue with displaying the nodes/leaves of the tree.. regardless of the order that the context is built (which is currently the order of the exploded BOM from from CS_BOM_EXPL_MAT_V2), the bom is displayed with the nested boms at the top of each level and the single materials below them. For example. If  TK1 contains Material1, Material2, Material3, Kit1(containing component1, comp2, comp3), Material4, Kit2(containing comp4, comp5, comp6), and Material5 (in this order), the tree will display with the A level node as TK1, the next node as Kit1 (with its subleaves of comp1,comp2,comp3), Kit2(with subleaves of comp4,comp5,comp6), THEN Material1, material2, material3, material4, material5.  Our users are adamant about the items displaying in the correct order (which should be alphabetical based on the description for one report and by location for purposes of inventory for another). I've searched but not been able to locate a similar question. If I've missed it, please point me in the right direction. The users want the tree,  not a "tree" table.  This is our first attempt at the tree, so maybe we're missing something basic?
    TK1
    -Mat1
    -Mat2
    -Mat3
    -Kit1
    --Comp1
    --Comp2
    --Comp3
    -Mat4
    -Kit2
    --Comp4
    --comp5
    --comp6
    -Material5
    displays as
    TK1
    -Kit1
    --Comp1
    --Comp2
    --Comp3
    -Kit2
    --Comp4
    --Comp5
    --Comp6
    -Mat1
    -Mat2
    -Mat3
    -Mat4
    -Mat5

    co-workers said example picture is misleading.. we can make the order work if everything is a "folder" but not a mix of "folders" and "files" (if making a visual reference to the windows browser). i.e - a file is represented as an empty folder.
    TK1    
    . Mat1
    . Mat2
    . mat3
    > kit1   
    .. comp1
    .. comp2
    .. comp3
    . mat4
    > kit2
    .. comp4
    .. comp5
    .. comp6
    . mat5
    displays at
    TK1
    > kit1
    .. comp1
    .. comp2
    .. comp3
    > kit2
    .. comp4
    .. comp5
    .. comp6
    . mat1
    . mat2
    . mat3
    . mat4
    . mat5
    we can make it work if everything is a folder. This is our current workaround.
    TK1
    > mat1
    > mat2
    > mat3
    v kit1 (when expanded)
    .. comp1
    .. comp2
    .. comp3
    > mat4
    > kit2 (when not expanded)
    > mat5

  • Jar file is not working after deleting all packages from the same directory

    hello
    i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
    Please tell me what may be the reason???
    thanks in advanced

    hello
    i have created a jar file named as server.jar in the same directory in which i have all the packages(for which i have created this jar file).This jar file was working correctly when i had all the packages in the same directory.But after deleting all the packages from the same working directory, this jar file is neither working nor giving any error message..
    Please tell me what may be the reason???
    thanks in advanced

  • How to Use different icons for JTree in the same level

    Hi guys, i come cross a problem with JTree. The module need a JTree which need to represent items in the same level using different icons. For example:
    [Icon for Root]Root
    |
    |_____________[Icon for Table] TABLES
    |
    |_____________[Icon for Index] INDEXS
    |
    |_____________[Icon for Views] VIEWS
    As i know, the default behavior for JTree is using the same icon for all leaves and
    the same icon for all node that has children. How can i achieve that?
    Thansk a lot!

    subclass DefaultTreeCellRenderer. if you overwrite the method below, then you can set the icon to whatever you want....!
        public Component getTreeCellRendererComponent(JTree tree, Object value,
                                    boolean sel,
                                    boolean expanded,
                                    boolean leaf, int row,
                                    boolean hasFocus) {
         String         stringValue = tree.convertValueToText(value, sel,
                               expanded, leaf, row, hasFocus);
            this.tree = tree;
         this.hasFocus = hasFocus;
         setText(stringValue);
         if(sel)
             setForeground(getTextSelectionColor());
         else
             setForeground(getTextNonSelectionColor());
         // There needs to be a way to specify disabled icons.
         if (!tree.isEnabled()) {
             setEnabled(false);
             if (leaf) {
              setDisabledIcon(getLeafIcon());
             } else if (expanded) {
              setDisabledIcon(getOpenIcon());
             } else {
              setDisabledIcon(getClosedIcon());
         else {
             setEnabled(true);
             if (leaf) {
              setIcon(getLeafIcon());
             } else if (expanded) {
              setIcon(getOpenIcon());
             } else {
              setIcon(getClosedIcon());
            setComponentOrientation(tree.getComponentOrientation());
         selected = sel;
         return this;
        }

  • Ive just got a new iPhone4 and I am trying to get the App's ie games from my iPhone3 onto the 4 and retain the same levels that I have reached on the 3, The Apps have gone onto the 4 but its making me re-start everything from level 1?

    Ive just got a new iPhone4 and I am trying to get the App's ie games from my iPhone3 onto the 4 and retain the same levels that I have reached on the 3,
    The Apps have gone onto the 4 but its making me re-start everything from level 1?
    Ive paid $$ for the games and then more $$ within the games via iTunes for in game purchases and desperatly want the games on the 4 with the levels that I have reached on the 3!
    Can anyone help!! Please!!!! My Smurfs and Animals are starving Hahahaha

    Mate, it's good to hear that you have gotten the iPhone 4 but sorry to burst your bubbles. Not all games can have the "saved" data ported over.
    Normally when you save a game in iPhone, the memory used is in the flash memory of the device. Those that can be ported over, reason is due to the data being saved over the air and when you logged in on a new device, it recognises you via the userID.
    Maybe you can try to backup your iPhone 3, and restore the file onto your iPhone 4. Not too sure if that would brick your phone though.

  • How do I get the volume on my ipod classic to the same level for all songs?  Some are louder than others.

    How do I get the volume on my ipod classic to the same level for all songs?  Some songs are a lot lower than others.

    Coverflow in iTunes is sorted by Album Artist whereas coverflow on the iPod classic is sorted by Artist. Unfortunately, there is no way to set this on your iPod. This is such a fumble on Apple's part that I'm beginning to think they're becoming another Microsloth with buggy firmware and products.

  • How to transfer game from iPad to iPad and still maintain the same level of game play of each game?

    How to transfer game from iPad to iPad and still maintain the same level of game play of each game?

    Check the following:
    That both your Mac and your iPad are signed into the same iCloud account
    Go to System Preferences>iCloud on your Mac, confirm that you have checked Documents & Data, then click Options and confirm that Pages is checked.
    Go to Settings>Pages on your iPad and confirm that "Use iCloud" is turned on.  Also go to Settings>iCloud and confirm that Documents & Data is on, and that Pages is turned on in the app list.

  • Several nested loop at the same level in an execution plan

    Hi, I am using 11gR2, and I've seen a execution plan in the trace of my SQL query (also shown in pl/sql explain plan) with 4 nested loops all at the same level, what does this mean?
    i.e.
    - SELECT STATEMENT, GOAL = FIRST_ROWS
    + NESTED LOOPS
    + NESTED LOOPS
    + NESTED LOOPS
    + NESTED LOOPS
    each NESTED LOOP can be expanded to 2 further actions, which make sense to me. e.g.
    + NESTED LOOPS
    + TABLE ACCESS BY INDEX ROWID
    + TABLE ACCESS BY INDEX ROWID
    THANKS
    Ye

    >
    why there are 4 Nested Loops
    what is the final result set for the SELECT statement come from (any one of the 4)
    the query run so slow in 11R2
    >
    So far you are the only one who knows what the query and execution plan are because you haven't posted them
    >
    Then you need to post the query, tell us what indexes are on the join columns and post the complete plan.
    >
    We can't even begin to explain why Oracle might have chosen the plan it did if we can't see the query and plan you want explained.
    And if we only see the plan we might be able to tell you what Oracle is doing but without knowing what indexes might be on the join columns and the filter criteria columns we can't tell you why Oracle chose the plan it chose.
    And the excerpt of the plan you did provide is incomplete. You removed the indenting possibly because you did not enclose it in 'code' tags (see the FAQ).
    >
    - SELECT STATEMENT, GOAL = FIRST_ROWS
    + NESTED LOOPS
    + NESTED LOOPS
    + NESTED LOOPS
    + NESTED LOOPS
    >
    There can't be four nested loops like that at the top level since the top level will be combining the result sets from it's children. A nested loop will have two children; like the last part you showed:
    >
    + NESTED LOOPS
    + TABLE ACCESS BY INDEX ROWID
    + TABLE ACCESS BY INDEX ROWID
    >
    The two 'TABLE ACCESS ...' will be indented on a normal plan.
    Without the query and plan there isn't much we can tell you.

  • How to make audio of many clips the same level?

    I have a sequence containing many interview clips which all seem to be at different sound levels. Is there any easy way to make all of these the same level? The only way I know how to adjust the level is using the volume level control under audio effects for a particular clip.
    Also i'm wondering whether there is a way to filter out background noise?
    Many Thanks

    If the mic was a different distance etc then you'll never be able to make them all sound exactly the same tone.  But For the background noise I'd really recommend the effects inside premiere I've already mentioned I have found that 90 percent of the time I don't ever need to use audition for interview type edits. I'm able to get by using a denioser and highpass to remove "most background" noises. However I don't film outside very often most of my background noise problems are usaully from too much gain or AC noise. So your scenario might be different than mine for this reason.
    The benifit of the compressor is that it can make your audio stay exactly within whatever range you want without having to keyframe stuff. With the clips you have desribed you'll want to use a different dynamics filter for each group. So put each group on it's own audio track. So group one that you have desribed would go on track 1 since all those clips have similar range etc. Basically with group 1 I wouldn't compress it at all. I'd leave it alone except for lowering it's audio by -2 on the audio track 1. That way all the clips in the first group will be lowered by 2db if you put them all on track 1. You won't have to worry about it's slightly too high peaks as long as you set a dynamics effect with nothing enabled on it besides the limiter on the master track and have the limiter set to -6 since you said that's what you need your max peak to be. If you do this then everything in group one will be handled as far as levels go. (as far as db goes anyways) However if you want to have other things in the project to be higher than -6 then just simply put the -6 limiter turned on track 1 then instead of the master track.
    Then for the second group I wouldn't touch them at all I'd put them on track 2 and just let the limter on the master track keep it's peaks from going to high since it's basically already where you want it. Then if the clips have a hissing noise or something you can add a denoiser and set the reduction to -10 and adjust from there.
    Then for your final set you are desribing -22 to -12 for these I'd put them on track 3 and use a dynamics filter and keep everything disabled except for the compressor itself. For this I'd start with my ratio at 2 and put my threshold at -20 and set my makeup gain at 9 or so. Then from there if it looks like it's way to loud then try lowering the gain and if it looks like its lows are too quite then add the gain back but if it appears to be to loud then simply raise your ratio or lower the threeshold a bit. But I think the settings I have listed will get your to your desired range.
    For the clips that are hitting -0 a lot if they are distorting then you really can't fix distortion but if they are hitting 0 and aren't distorting then you can just simply lower the volume for these you don't need to add any gain since they are already too loud anyways so if you just lower them by like -6 it should get them right within the range you mentioned.
    As far as background noise such as hissing you'll really want to just use Premiere's denoiser effect. Start off by setting the reduction to like -10 and adjust from there. Then for cars passing etc try out a highpass filter and set it to 120 to start and move up there if needed. It will take the bass out of the peoples voices but it won't sound bad unless you start going over 160-170 range it also depends on if the person has a deep voice to begin with or not too though.

  • Is it possible to have the menu bar and the tabs on the same level?

    Just downloaded Firefox 4 and I've started to get used to tabs being above the address bar (since it fits the theme so well), but I'm not used to the loss of the menu bar. When I bring the menu bar back, however, it creates a whole new level instead of being on the same level as the tabs like the Firefox button is. I'm just wondering if there's a way to make the menu bar and the tabs on the same level.

    No, that is not possible.
    Press F10 or press and hold the Alt key down to bring up the "Menu Bar" temporarily.
    * New Old Menu: https://addons.mozilla.org/firefox/addon/new-old-menu/
    * Personal Titlebar: https://addons.mozilla.org/firefox/addon/personal-titlebar/
    * Personal Menu (Personal Firefox Button): https://addons.mozilla.org/firefox/addon/personal-menu/

  • My own package of the same name as one in the repo...

    In a nutshell, how does pacman handle a user-created package of the same name as one in the repo?  I ask because I'd like to customize the build options on a package that's in the official repo.  Is it best to simply change the name of my package or is pacman smart enough to know that package xyz installed locally is not to be upgraded to package xyz from the repo?

    thayer wrote:What I typically do is bump the release number to 99, such as foopackage-1.0-99.  By doing it this way pacman won't upgrade the package unless a new upstream release is made, such as 1.1 in the previous example.
    Similarly, if you build a package locally to fix some packaging bug, and you expect that you'll be interested in any updates at all, I bump the release number by 0.1 so it's bigger than the version I'm fixing but smaller than whatever the Arch maintainer will supply next.

  • LabVIEW 2010 App Builder: Registry editor has issue with keys of the same name at the same level in registry tree

    This is a bug report for an NI application engineer.  Please file a CAR. 
    In a LabVIEW 2010 project, create a new installer build and go to the Registry editor.
    Enter some keys like the following
    Click OK to close the installer wizard.
    Now reopen the build specification and go to the Registry editor.  The registry editor comes up blank and non functional.
    I believe the registry entries are still written when the installer executes, but you cannot edit the registry any further in LabVIEW 2010.  This was not an issue in LV 2009. The issue seems to stem from having two keys with the same name at the same level in the registry tree (in this case, the two "Test" keys). 

    Hi sensor_daniel,
    This was reported to R&D (#305026) for further investigation.
    Thanks for the feedback! 
    Have a great day,
    Chris V
    Applications Engineer
    National Instruments

  • How to transport a value in the same level rule

    I want to transport a value in the same level rule,but failed. Would you please give me some idea to finish it? Thank you!

    the sample about rule zz01 as the fllowing:
    zz01
           4001 deduction for absent from work
            SETIN R=3 
             SETIN A=01    'NUM=3
              ADDWTI4Z03   '4Z03=3
        4002 sick leave
                  SETIN R=3
                  SETIN A=01
                  ADDWTI4Z09    'set 4Z09=3
    I want to transport the value of NUM in wagetype 4001 to  the variable in wagetype 4002.
      Thank you!

  • I can't import MXF files shot on a Canon C300 into FCP 10.1.2.  I have the Canon plug in for MXF file to FCP import but FCPX still doesn't recognize MXF files when I try to import. Premiere works fine importing MXF on the same computer.

    I can't import MXF files shot on a Canon C300 into FCP 10.1.2.  I have the Canon plug in for MXF file to FCP import but FCPX still doesn't recognize MXF files when I try to import. Premiere works fine importing MXF on the same computer.  Any help is appreciated.

    Russ and Luis,
    I did uninstall and re-install Canon XF Utility and the Canon FCPX plug in.   Still no luck.  I checked the CanonXF64.RADPlug folder is on my computer in the Rad Plugins folder in application support  This is where it is supposed to be as far as I can figure out. 
    Another piece of the puzzle is that  footage shot on a Canon C300 in 2013 and  I reimported today and it DOES import into FCP10.1.3.   Footage shot on a different Canon C300 filmed this summer will NOT import into FCPX.  The latter will import into Premiere. But I am trying to work in FCPX, but maybe I shouldn’t be??
    Any ideas?  (screen shots below)
    Thanks.
    Peace, Huey
    FYI Here is what Canon says
      "There is another trick that works sometimes though.  Try uninstalling the plugin and XF Utility.  Then, install the latest XF Utility, followed by the plugin, in that order."
    I did do this but no results.  Otherwise they say I need to wait for a new plugin.
    Here's 2014 Canon C300 files does NOT import to FCPX
    Here's 2013 Canon C300 files does import into FCPX.  I thought it was Contents folder but another set of footage shot on C300 does import and there is no contents folder for that. 

Maybe you are looking for